×

用otool查看应用的动态库

Falcon 2021-04-20 views:
自动摘要

正在生成中……

在MacOS中如何查看一个应用都使用了哪些动态库,包括系统自带的动态库和第三方动态库?

可以使用otool命令:

otool -L /usr/local/bin/openresty

将输出动态库的位置和版本信息:

/usr/local/bin/openresty:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
	/usr/local/Cellar/openresty/1.19.3.1_1/luajit/lib/libluajit-5.1.2.dylib (compatibility version 2.1.0, current version 2.1.0)
	/usr/local/opt/pcre/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.11.0)
	/usr/local/opt/openresty-openssl111/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/usr/local/opt/openresty-openssl111/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/local/opt/geoip/lib/libGeoIP.1.dylib (compatibility version 8.0.0, current version 8.12.0)

 

参考链接1:https://kangzubin.com/otool-command/

参考链接2:http://blog.sunnyxx.com/2014/08/30/objc-pre-main/

本文收录于