查看二進制文件的編譯器版本
strings info.o |grep GCC
GCC: (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) 4.6.3 20120201 (prerelease)
查看依賴的共享庫
readelf -d xxx.so
查看是否strip過
file xxx.so
查看符號
nm xxx.so
是否帶gdb調試信息
aarch64-linux-gnu-readelf --debug-dump=decodedline libWPE-platform.so
readelf -S ovsdb-server 帶-g的會有.debug_info .debug_line等信息 多出了.debug_frame和.debug_loc
或者
gdb libWPE-platform.so
顯示Reading symbols from /mnt/tmp/libWPE-platform.so_gdb...done.為有gdb信息
顯示Reading symbols from /mnt/tmp/libWPE-platform.so...(no debugging symbols found)...done.
沒有gdb信息
1.查看文件能執行的機器及是否strip過
file xxxx
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, not stripped
2.二進制文件格式
objdump -a xxx
xxx: file format elf64-x86-64
靜態鏈接庫
objdump -a *.a
動態鏈接庫
objdump -a *.so