1、ldd
如果是用x86架构编译的话,ldd可查看依赖的动态库:
ldd a.out
linux-vdso.so.1 => (0x00007fff13cd9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f243f13e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f243f512000)
2、mipls 架构中可用,mipsel-linux-uclibc-readelf命令:
mipsel-linux-uclibc-readelf a.out -all
Dynamic section at offset 0x1a0 contains 27 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.0]
3、应用运行过程中可从/proc信息中查看
cat /proc/391/maps
2aadf000-2aae0000 r--p 0000f000 00:0c 252 /lib/libpthread-0.9.29.so
2aae3000-2ab0d000 r-xp 00000000 00:0c 258 /lib/libgcc_s.so.1