[llvm-dev] Embedding LLD version to executables
Rui Ueyama via llvm-dev
llvm-dev at lists.llvm.org
Fri Nov 11 14:40:10 PST 2016
For the record, this feature is implemented in r286496 (
https://reviews.llvm.org/D26487). Now the LLD version string is embedded to
output's .comment section. You can use objdump to see it.
$ objdump -s -j .comment foo
foo: file format elf64-x86-64
Contents of section .comment:
0000 00474343 3a202855 62756e74 7520342e .GCC: (Ubuntu 4.
0010 382e342d 32756275 6e747531 7e31342e 8.4-2ubuntu1~14.
00c0 766d2f74 72756e6b 20323835 38343629 vm/trunk 285846)
00d0 004c696e 6b65723a 204c4c44 20342e30 .Linker: LLD 4.0
00e0 2e302028 7472756e 6b203238 36343036 .0 (trunk 286406
00f0 2900 ).
On Sat, Oct 29, 2016 at 12:50 AM, Sean Silva via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On Wed, Oct 26, 2016 at 4:16 AM, Joerg Sonnenberger via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>> On Tue, Oct 25, 2016 at 06:07:09PM -0400, Rafael Espíndola via llvm-dev
>> > I am ok with both ".note.linker-version" and adding an entry to
>> There is one important different between the two -- strip normally has
>> to preserve the former, but not the latter. As such, I'd quite a bit
>> prefer using .comment.
> +1 for .comment; we should be consistent with how clang handles .ident,
> since this is conceptually the same information.
> In fact, during LTO, LLD should probably add an ident entry to any module
> that it codegens to indicate that it was codegenerated through LLD; but
> that's a separate discussion.
> -- Sean Silva
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev