ramp
ramp

Reputation: 311

.comment section with two lines

I have an executable with two lines in comment section as readelf shows :

readelf -p .comment ac_test

String dump of section '.comment':
  [     0]  GCC: (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
  [    39]  GCC: (GNU) 4.6.0

The 4.3.4 compiler is the one installed in the Suse Linux but the 4.6 is compiled from sources. I have fix the PATH to point to 4.6 so the executable is compiled with.

I have the doubt if in any way the 4.3.4 toolchain is used.

My question is : Why do I have two compilers in the .comment section?, is any problem with that?,

Thanks.

Upvotes: 6

Views: 3419

Answers (1)

twalberg
twalberg

Reputation: 62439

Hard to say with that little bit of information, but it's probable that the comment from the 4.3.4 compiler comes from an object or library that was linked into your binary (i.e. you didn't compile it yourself with your 4.6 compiler).

Upvotes: 4

Related Questions