ldd
is an incredibly useful command under linux. It lists the shared-libraries required by an executable, and exactly which .so file each dependency is currently resolved to.
A similarly useful tool is od
, which permits inspection of object files, especially executable and shared-libraries, extracting things like the string-table, symbol-table, and various headers and sections.
Under Darwin these tools are combined in otool
. ldd
can be duplicated by otool -L
.