This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Improve .note section handling in readelf
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 27 Oct 2004 10:14:51 +0930
- Subject: Re: PATCH: Improve .note section handling in readelf
- References: <200410260216.i9Q2GKAR025509@sirius.codesourcery.com>
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..
> 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.
--
Alan Modra
IBM OzLabs - Linux Technology Centre