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: [PATCH] Put .gnu.linkonce.d.rel.ro.* sections into .data.rel.ro output section


On Wed, Dec 14, 2005 at 03:42:00PM +0100, Jakub Jelinek wrote:
> On Thu, Dec 15, 2005 at 01:03:29AM +1030, Alan Modra wrote:
> > Is there any good reason why all the .data.rel.ro.local input sections
> > must be first?  I suspect it might be better to keep the ordering as
> > given in input files, for data locality.  ie. use
> > 
> > DATARELRO=".data.rel.ro : { *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
> 
> Yes.  .data.rel.ro.local* sections contain only relative relocations, while
> other .data.rel.ro* sections contain also other relocations.
> When prelinking relative relocations don't need any runtime adjustements,
> while the others do.  So if you have say 16KB of .data.rel.ro.local*
> sections and 32KB of .data.rel.ro*, the first 16KB don't need to be COWed,
> only the rest.

Oh, OK.

> Guess *(.data.rel.ro.local) should be *(.data.rel.ro.local*) though.

Yes.  Hmm, let's have just the sorting you need:

DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"

And if there is some further reason why you need full sorting, just
commit your patch and ignore me.  :)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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