在一些情况下,需要确认可执行文件的gcc版本。
可用下面命令快速确认:
$ strings -a helloworld | grep -i gcc
libgcc_s.so.1
GCC_3.5
GCC: (Sourcery CodeBench Lite 2013.05-24) 4.7.3
__aeabi_unwind_cpp_pr0@@GCC_3.5
__aeabi_unwind_cpp_pr1@@GCC_3.5
或是:
$ objdump -s -j .comment helloworld
helloworld: 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 31332e30 352d3234 2920342e 372e3300 13.05-24) 4.7.3.