This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: [gold patch] Fix relro problem on ARM


Hi Tristan,

   Can you please merge it to next release?  This fixes 2 gold
regressions of the snap-shot binutils-2.20.90 on ARM.

-Doug

---------- Forwarded message ----------
From: Cary Coutant <ccoutant@google.com>
Date: Tue, Nov 16, 2010 at 10:56 AM
Subject: [gold patch] Fix relro problem on ARM
To: Binutils <binutils@sourceware.org>, Ian Lance Taylor
<iant@google.com>, Doug Kwan <dougkwan@google.com>


Doug found that the PT_GNU_RELRO segment still wasn't being aligned
properly on ARM, and we discovered that if the ORDER_RELRO_LAST list
is empty (as it is for ARM), the padding we add doesn't get accounted
for when setting the segment size. This patch fixes that by adding the
padding to the increase_relro value, which is later added to the
segment size in Output_segment::set_offset(). We also added an assert
in set_offset() to verify that the RELRO segment is correctly aligned.

Tested on x86_64 and ARM. OK?

-cary (& Doug)

? ? ? ?* output.h (Output_segment::set_section_addresses): Pass increase_relro
? ? ? ?by reference; adjust all callers.
? ? ? ?* output.cc (Output_segment::set_section_addresses): Adjust references
? ? ? ?to increase_relro. Add padding to *increase_relro when ORDER_RELRO_LAST
? ? ? ?list is empty.
? ? ? ?(Output_segment::set_offset): Assert if PT_GNU_RELRO segment does not
? ? ? ?end at page boundary.

Attachment: gold-arm-relro-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]