Thomas Sampson

Checking Unix Executable Dependencies

Leave a comment

Tonight I needed to check the runtime dependencies of a native unix executable. Luckily this can be achieved with a single command using the ldd utility (linux) or otool (MacOSX) to print a list of shared object dependencies as follows;

Linux

ldd myapp

MacOSX

otool -L myapp

Example Output

linux-gate.so.1 => (0xb76f8000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb7601000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb75d5000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb75b6000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb759b000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb73f6000)
/lib/ld-linux.so.2 (0xb76f9000)

Advertisements

Author: tomtech999

I have recently graduated with a 1st class degree in MComp Games Software Development at Sheffield Hallam University, focusing primarily on application development in C++, with experience in graphics programming, scripting languages, DVCS/VCS and web technology. In my spare time I enjoy Drumming, Reading and Snowboarding!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s