1、用nm
命令查看目标文件的符号表
langu@langu:~/linuxk/union_big_bit$ nm unionbigbit.o
0000000000000000 T main
0000000000000000 U printf
The symbol value The symbol value The symbol value
2、langu@langu:~/linuxk/variable_store$ readelf
Usage: readelf <option(s)> elf-file(s)Display information about the contents of ELF format files
Options are:
-a --all Equivalent to: -h -l -S -s -r -d -V -A -I
-h --file-header Display the ELF file header
-l --program-headers Display the program headers
--segments An alias for --program-headers
-S --section-headers Display the sections' header
--sections An alias for --section-headers
-g --section-groups Display the section groups
-t --section-details Display the section details
-e --headers Equivalent to: -h -l -S