This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Question] why contains two gcc version in .comment of a ELF executable ?
- From: Taeung Song <treeze dot taeung at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 24 Apr 2017 16:18:08 +0900
- Subject: [Question] why contains two gcc version in .comment of a ELF executable ?
- Authentication-results: sourceware.org; auth=none
Hi all,
I think this may be newbie question.
But I wonder the reason of below case.
I'd appreciate it, if you explain the reason. :)
$ readelf -p .comment /usr/local/lib/libmcount-fast.so
String dump of section '.comment':
[ 0] GCC: (GNU) 7.0.1 20170405 (experimental)
[ 29] GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
If I detailedly describe current situation,
my default gcc version is 5.4.0
$ gcc --version | head -1
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
but I used gcc 7.0.1 that I manually built with recent source code
instead of gcc 5.4.0.
$ gcc --version | head -1
gcc (GCC) 7.0.1 20170405 (experimental)
And then I built a library by gcc 7,
so I found the above result from "readelf -p .comment".
Could I know the reason ?
Thanks,
Taeung