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


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


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