This is the mail archive of the binutils@sources.redhat.com 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: Problem with referenceable sections ("link sets")


Jason R Thorpe <thorpej@wasabisystems.com> writes:

> On Sun, Nov 17, 2002 at 10:00:35PM -0800, Ian Lance Taylor wrote:
> 
>  > Well, yeah, an AT statement that applies to the .rodata section won't
>  > be applied to other sections which are sorted with the .rodata
>  > section.
> 
> Bleh.  That kinda sucks :-/  Is there an easy way to make orphans
> sorted into .rodata (or any other section) honor the AT?  Would that
> be desirable?  Seems to me that it makes sense to do so ... the behavior
> can't possibly be right otherwise (at least for LOAD sections).

This could probably be done.  In gld${EMULATION_NAME}_place_orphan()
in ld/emultempl/elf32.em copy any AT statement into the call to
lang_leave_output_section_statement().  You will need to properly
adjust it for the size of the section which you are following.  This
will be ld expression hackery--shouldn't be too tough.

> Could you point me at where to add the code to insert these symbols for
> explicitly-listed C-referenceable sections?  This is where my eyes began
> to glaze over before :-)

That too is in gld${EMULATION_NAME}_place_orphan().  Search for
__start.

Ian


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