This is the mail archive of the binutils@sourceware.org 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]

[Question] why contains two gcc version in .comment of a ELF executable ?


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


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