[patch] stop objcopy breaking group sections

Daniel Jacobowitz drow@false.org
Fri Sep 26 00:53:00 GMT 2008


On Fri, Sep 26, 2008 at 08:35:40AM +0930, Alan Modra wrote:
> 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.

So, it seems to me, we're wrong to use such a section sym as a group
signature.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list