Discovery of Dynamic library dependency on Mac OS

2019-03-07 18:08发布

On Windows there is a tool Depends.exe to discover dependency of an EXE/DLL file on other DDLs. Which commandline tool is equivalent on Mac OS and Linux?

3条回答
一纸荒年 Trace。
2楼-- · 2019-03-07 18:54

You can also try MacDependency (http://macdependency.googlecode.com) which provides an UI replacement for otool on MacOS X. It shows complete dependency trees and the exported symbols as well.

查看更多
SAY GOODBYE
3楼-- · 2019-03-07 19:00
  • Mac OS X: otool -L file
  • Linux: ldd file

If those commands don't provide what you want, on Mac OS X you can dump all the load commands with otool -l file. On Linux you can dump the entire contents of the dynamic section with readelf -d file.

查看更多
Juvenile、少年°
4楼-- · 2019-03-07 19:03

try ldd in the terminal. This will provide you a list of dynamic libraries that the binary needs.

查看更多
登录 后发表回答