Linux

How to get compiler information from already built elf binary? 이미 빌드된 바이너리로부터 컴파러 정보 찾기.

Real_G 2016. 2. 4. 11:53
반응형

strings -a ./ffmpeg | grep "gcc"

libgcc_s.so.1

gcc 4.8.3 (Sourcery CodeBench Lite 2014.05-23) 20140320 (prerelease)


$ objdump -s --section .comment ./ffmpeg 


./ffmpeg:     file format elf32-little


Contents of section .comment:

 0000 4743433a 2028536f 75726365 72792043  GCC: (Sourcery C

 0010 6f646542 656e6368 204c6974 65203230  odeBench Lite 20

 0020 31342e30 352d3233 2920342e 382e3320  14.05-23) 4.8.3 

 0030 32303134 30333230 20287072 6572656c  20140320 (prerel

 0040 65617365 2900                        ease).          



$ readelf -wi ./ffmpeg   이건 디버그모드로 컴파일 되었을 때 가능


$ objdump -s --section .comment /usr/lib64/flash-plugin/libflashplayer.so

$ readelf -p .comment /usr/lib64/flash-plugin/libflashplayer.so

반응형