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]

Re: Fix relro strip test for MIPS


On Wed, Sep 19, 2007 at 01:52:01PM -0400, Daniel Jacobowitz wrote:
> On Wed, Sep 19, 2007 at 10:49:36AM -0700, H.J. Lu wrote:
> > On Wed, Sep 19, 2007 at 12:05:54PM -0400, Daniel Jacobowitz wrote:
> > > There are two unique things about MIPS which conspire to fail the
> > > ld -z relro -shared tests (which test that objcopy and strip do not
> > > change the binary).  One is that .dynamic is writable and there is no
> > > .got.plt section, so a typical shared library has no PT_GNU_RELRO;
> > > it gets added and then converted to PT_NULL.  The other is that it
> > 
> > We shouldn't generate a PT_NULL segment when PT_GNU_RELRO is unused.
> > X86 linkers should handle it correctly.
> 
> What avoids the extra segment?  There's definitely code in elf.c to
> convert PT_GNU_RELRO to PT_NULL.

I believe Alan checked in a patch to remove PT_NULL segment.
x86 linker won't generate PT_GNU_RELRO for -z relro if it
isn't needed. Some linker relro tests I checked in are specific
to test this.  My goal was to turn on -z relro unconditonally and
PT_GNU_RELRO won't be generated if it isn't supported or used. It
works on x86 and ia64.



H.J.


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