[每天一个Linux小技巧] 查看可执行文件的编译器版本

在一些情况下,需要确认可执行文件的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.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值