[patch] stop objcopy breaking group sections

Alan Modra amodra@bigpond.net.au
Thu Sep 25 23:06:00 GMT 2008


On Thu, Sep 25, 2008 at 08:21:19AM -0400, Daniel Jacobowitz wrote:
> I vaguely recall that there's a hack involved in the names of section
> symbols; BFD wants them to have the section name but we changed it not
> to output the name unless it was necessary.  Could that be the
> problem?  The spec does talk about the name of the symbol, not the
> name of the corresponding section.

Yes, STT_SECTION symbols have st_name of zero (*).  Their name is that
of their st_shndx section.  See elf.c:bfd_elf_sym_name.

*) At least, that's how GNU ld creates section symbols.  In a quick
look over the ELF gabi, I couldn't see anything that officially
blesses this practice.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list