PATCH: Improve .note section handling in readelf
Mark Mitchell
mark@codesourcery.com
Wed Oct 27 00:53:00 GMT 2004
Alan Modra wrote:
> On Mon, Oct 25, 2004 at 07:16:20PM -0700, Mark Mitchell wrote:
>
>>Also, I see that obj-elf.c in GAS is emitting bogus entries when
>>processing ".version". In particular, it sets the name in the note to
>>the version. The name in the note should be the toolchain that
>>created the note, probably "GNU" in our case. The version itself
>>should go in the description field.
>
>
> That is true according to the current ELF gABI, but the wording is
> fairly weak "by convention, vendors use their own name". However, gas
> has been using the name entry for the version string since 1993, which
> predates any ELF spec I could find. Changing the note will no doubt
> break tools that scan this note, if there are any such tools.
>
> Which is really just stating the obvious. I'm not against the change
> since I'm not aware of any tools that scan NT_VERSION notes..
Yes, that's why I was asking. I do not know of any such tools, but then
again I don't know that I would know. :-) I'm not very intent on
changing this; it's not hurting me in any way. It's just weird is all.
>> And, the "namesz" field in the
>>ELF note is bogus; it's being rounded up to a wordsize boundary, but
>>the correct thing to is just to pad the entry itself, not round the
>>"namesz" field.
>
> Yes, that should be fixed.
OK, I'll do at least that bit then.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
More information about the Binutils
mailing list