PDA

View Full Version : Which compiler i used


oubountou
January 8th, 2008, 09:58 AM
Hi all,

i have two compilers on my machine: gcc and cc (sun studio)
i have a compiled file. is there a way to see which compiler i have used to compile it?

Thanks in advance.

stroyan
January 9th, 2008, 03:42 AM
Try using readelf or objdump to dump the .comment section like this- readelf -x .comment a.out
objdump -s -j .comment foo.oAt least recent versions of gcc write their version information in that section. (But the section may be stripped out by the build of your compiled file.)

oubountou
January 9th, 2008, 06:31 AM
The second one worked great..
many Thanks!!