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]

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


Hi Taeung,

>    $ 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

Simply put - some parts of libmcount-fast.so were built with gcc 7.0.1
and other parts were built with gcc 5.4.0.  In both cases the version of
gcc used to build those parts was recorded in the binary, in a special 
section called .comment.  When these parts were linked together to form 
libmcount-fast.so the strings were concatenated, and hence you get the
results you describe above.

Cheers
  Nick


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