ldd : 列出一个可执行文件在运行时需要的共享库信息
ar : 创建静态库,插入,删除,列出和提取成员
strings : 列出文件中的所有可打印字符串strip : 从目标文件中删除符号表信息
nm : 列出目标文件中符号表中定义的符号
size : 列出目标文件中节的名字和大小
readelf : 显示一个木边文件完整结构,包括elf头中的编码的所有信息,包含size和nm的功能
objdump : 所有二进制工具之母。能够显示一个目标文件中的所有信息,它最有用的功能是反汇编.text节中的二进制指令
(1)arm-linux-gcc编译的程序:若有一个名为test1的可执行程序
#readelf -a "./test1" | grep "Shared"
结果:
0x00000001 (NEEDED) Shared library: [libQtSql.so.4]
0x00000001 (NEEDED) Shared library: [libQtGui.so.4]
0x00000001 (NEEDED) Shared library: [libQtNetwork.so.4]
0x00000001 (NEEDED) Shared library: [libQtCore.so.4]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.6]
(2)gcc编译的程序,可在pc上执行的名为test1的可执行程序:
#ldd test1
结果:
linux-gate.so.1 => (0x00110000)
libQtSql.so.4 => /usr/local/Trolltech/Qt-4.6.3/lib/libQtSql.so.4 (0x00111000)
libQtGui.so.4 => /usr/local/Trolltech/Qt-4.6.3/lib/libQtGui.so.4 (0x00379000)
libQtCore.so.4 => /usr/local/Trolltech/Qt-4.6.3/lib/libQtCore.so.4 (0x00dff000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0014f000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x063d4000)
libm.so.6 => /lib/libm.so.6 (0x00168000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00191000)
libc.so.6 => /lib/libc.so.6 (0x0019f000)
libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x00308000)
librt.so.1 => /lib/librt.so.1 (0x0030d000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x0411c000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00317000)
libz.so.1 => /lib/libz.so.1 (0x0033e000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x03a10000)
libgobject-2.0.so.0 => /lib/libgobject-2.0.so.0 (0x03346000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00352000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x03002000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x0691c000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x06b30000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x0697e000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x076ac000)
libdl.so.2 => /lib/libdl.so.2 (0x068e4000)
/lib/ld-linux.so.2 (0x0035b000)
libselinux.so.1 => /lib/libselinux.so.1 (0x06a26000)
libexpat.so.1 => /lib/libexpat.so.1 (0x08ccb000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x08a8b000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x08a7b000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x08c1b000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x08abb000)