This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold patch] Fix relro problem on ARM
On Nov 17, 2010, at 9:42 PM, Doug Kwan (éæå) wrote:
> 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,
I can do that but it would be much simpler to me if you could post instead the url of the commit message
(from the ml archive http://sourceware.org/ml/binutils-cvs/)
Thanks.
>
> -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.
> <gold-arm-relro-patch.txt>