PATCH COMMITTED: Define NT_GNU_GOLD_VERSION

Ian Lance Taylor iant@google.com
Tue Mar 25 14:46:00 GMT 2008


Daniel Jacobowitz <drow@false.org> writes:

> On Mon, Mar 24, 2008 at 09:58:23PM -0700, Ian Lance Taylor wrote:
>> Gold emits a note holding the version of gold which was used to create
>> the binary.  This has proved useful for identifying and fixing bugs.
>> It is similar to the .comment section created by gcc, except that it
>> follows the note format defined by the ELF ABI.
>
> Does that note end up allocated?  I don't remember if there's support
> for mixing allocated and non-allocated notes.

It is not allocated.

GNU ld supports both allocated and unallocated notes--it just places
them according to their names in the linker script.  gold also
supports both types of notes, although it swiches based on the section
flags rather than the name.

In any case, it doesn't matter too much what GNU ld does, since gold
only emits these notes in executables and shared libraries, not in
object files.

Ian



More information about the Binutils mailing list