bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/30187] ld.bfd and ld.gold versions in .comment section of ELF


From: tkacvins at gmail dot com
Subject: [Bug gold/30187] ld.bfd and ld.gold versions in .comment section of ELF files
Date: Wed, 01 Mar 2023 18:32:14 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=30187

--- Comment #2 from Tom Kacvinsky <tkacvins at gmail dot com> ---
(In reply to Nick Clifton from comment #1)
> (In reply to Tom Kacvinsky from comment #0)
> Hi Tom,
>  
> > Results in the ld.gold version not being in the .comment section. 
> 
> But - just to be clear - it is in the .note.gnu.gold-version section:
> 
>   % readelf -p.note.gnu.gold-version a.out
> 
>   String dump of section '.note.gnu.gold-version':
>     [     c]  GNU
>     [    10]  gold 1.16
> 
> So this is a request for gold to add or move the version number into the
> .comment section, right ?  And add the feature to ld too, of course.

Yes, this is correct - to make it more in line with what LLD does.
> 
> 
> Note - it is possible to achieve the desired effect using an extra object
> file:
> 
>   % cat ld-version.s
>       .section .comment       
>       .asciz "GNU ld version 2.37-37.fc36";
>   % gcc hello.c ld-version.s
>   % readelf -p.comment
>    [     0]  GCC: (GNU) 12.2.1 20221121 (Red Hat 12.2.1-4)
>    [    2e]  GCC: (GNU) 12.0.1 20220413 (Red Hat 12.0.1-0)
>    [    5c]  GNU ld version 2.37-37.fc36
> 
> But I am sure that this is not what you want.
> 

This is feasible in that we can use cmake to generate the .s file, or
perhaps generated a new object file everything we upgrade binutils.

But...

> Hmm, let me see if it is an easy thing to do...

This would be ideal if you or someone on the binutils team can do it.

Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]