ld --section-start prevents merging sections

Alan Modra amodra@bigpond.net.au
Tue Nov 17 00:09:00 GMT 2009


On Fri, Nov 13, 2009 at 07:35:47PM -0800, H.J. Lu wrote:
> On Fri, Nov 13, 2009 at 7:16 PM, Papalagi Pakeha
> > But then .. how come the sections are properly merged when not using
> > --section-start ?
> 
> It may be related to:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=10749

No, it is because the elf section type is wrongly set.  --section-start
results in a call to init_os lacking an input section, and thus
lacking knowledge of the correct output section type.  The first
orphan input section is mapped to the right output section because at
that point the section flags are also not set.  The second and
subsequent orphans fail the _bfd_elf_match_sections_by_type test at
line 1826 of elf32.em.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list