Discovery of Dynamic library dependency on Mac OS & Linux Discovery of Dynamic library dependency on Mac OS & Linux windows windows

Discovery of Dynamic library dependency on Mac OS & Linux


  • 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.


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


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