[patch] stop objcopy breaking group sections
Andrew Stubbs
ams@codesourcery.com
Thu Sep 25 12:10:00 GMT 2008
Alan Modra wrote:
> 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.
OK, I'll admit that I do not fully understand how this mechanism works.
The code is less than easy to understand, and it doesn't help that it
doesn't even attempt to do copies precisely.
On a second examination it does seem that the value of sh_info is
meaningful, although confusingly it doesn't use the same value that the
original file had (and I still can't see the mechanism by which it
calculates this value).
But I can't decide if this is "wrong" or not. Your quote said "The name
of the specified symbol table entry provides a signature for the section
group." In this case readelf does not display a name for the symbol. It
is this anonymity that is causing the problem, but I don't know why yet.
Hmmm, I'm going to have to go away and think about this one some more.
Thanks
Andrew
More information about the Binutils
mailing list