This is the mail archive of the binutils@sourceware.org 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: [patch] stop objcopy breaking group sections


On Thu, Sep 25, 2008 at 10:20:48AM +0100, Andrew Stubbs wrote:
> Alan Modra wrote:
> >So the group id symbol is now the section symbol for the group.
> >What's wrong with that?
> 
> Two things:
> 
> 1. I asked it to (obj)copy the file, not modify section names.

As you noted, this is minor.  objcopy can and does make many changes
on a simple copy, especially on objects produced by non-GNU tools.

> 2. The sh_info field is pointing at the wrong symbol. The group is broken.
> 
> I'm not sure which point you were making, but hopefully that's answered it.

Nope.

The ELF spec says sh_info for SHT_GROUP is:

The symbol table index of an entry in the associated symbol table. The
name of the specified symbol table entry provides a signature for the
section group.

Since the section name is changed to the group name, it should be
possible to use the section symbol as the id symbol.  Doesn't look
like a "wrong symbol" or "broken" to me.  If ld is having trouble
linking such a group, then we need to fix ld.

-- 
Alan Modra
Australia Development Lab, IBM


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