This is the mail archive of the binutils@sources.redhat.com 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: Improve .note section handling in readelf


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


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