Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Discovery of Dynamic library dependency on Mac OS & Linux

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?

like image 698
Viet Avatar asked Jun 29 '09 08:06

Viet


1 Answers

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

like image 83
mark4o Avatar answered Oct 07 '22 09:10

mark4o