기왕이면 gcc 버전을 맞춰서 소스를 컴파일하려합니다.
기본적으로 잘 동작하는 바이너리도 제공되구요..
문제는 어느 gcc 버전으로 컴파일했다는 정보가 없는데요,
제공된 바이너리만 가지고 컴파일할때 사용한 gcc 버전을 알 수 있는 방법 없을까요?
$ readelf -S a.out ... [25] .comment PROGBITS 00000000 001014 000149 00 0 0 1 ... $ readelf -x 25 a.out Hex dump of section '.comment': 0x00000000 00474343 3a202847 656e746f 6f20342e .GCC: (Gentoo 4. 0x00000010 332e322d 72332070 312e362c 20706965 3.2-r3 p1.6, pie 0x00000020 2d31302e 312e3529 20342e33 2e320000 -10.1.5) 4.3.2.. ... $ _
-- C FAQ: http://www.eskimo.com/~scs/C-faq/top.html Korean Ver: http://www.cinsk.org/cfaqs/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html Korean Ver: http://cinsk.github.io/cfaqs/
objdump 로 읽으셔도 되요
objdump -s -j .comment [filename]
.comment 섹션만 보는 것입니다.
$ readelf -S a.out... [25]
--
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://www.cinsk.org/cfaqs/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://cinsk.github.io/cfaqs/
objdump 로 읽으셔도
objdump 로 읽으셔도 되요
objdump -s -j .comment [filename]
.comment 섹션만 보는 것입니다.