phdrs for orphans

Alan Modra amodra@bigpond.net.au
Mon Dec 9 10:23:00 GMT 2002


On Mon, Dec 09, 2002 at 11:22:33PM +1030, Alan Modra wrote:
> In the case where a linker script specifies PHDRS, lang_record_phdrs
> chooses a program header segment rather poorly for orphan output
> sections, just tacking anything without an explicit phdr onto the last
> phdr.  I reckon we'll do better by first trying to use the same phdr
> as the section that the orphan naturally groups with.
> 
> 	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
> 	orphan output section phdrs from "place->os" phdrs.
> 
> I'll commit this in the morning, all being well, as sources.redhat.com
> doesn't seem to want to talk at the moment.

Hmm, but why is the output statement re-ordering done by place_orphan
not doing this for us automatically?  Huh, looks like place_orphan is
re-ordering the wrong list!  I'll revisit this tomorrow..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list