方法1:用objdump查看
objdump -x xxx.so | grep NEEDED
objdump -x ./a.out | grep NEEDED
方法2:用readelf查看
readelf -a xxx.so | grep "Shared"
readelf -a ./a.out | grep "Shared"
或者
readelf -d xxx.so
readelf -d ./a.out
查看静态库有哪些.o文件
readelf -d xxx.a
方法3:用ldd查看
ldd xxx.so
ldd ./a.out
查看哪些进程在使用某个so,比如
lsof /.../libpthread-x.xx.so
正文完