Thomas Sampson


Leave a comment

Checking Unix Executable Dependencies

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)


1 Comment

Making an ISO file from terminal in Ubuntu

Today I discovered the mkisofs command, a general linux command not specific to Ubuntu. This command enables you to make an ISO disk image of any folder or group of files on your hard drive or external media. I used it today to make an ISO file of a CD which appears to have worked perfectly using the following command

mkisofs -o EPSON.iso /media/cdrom0

The -o parameter specifies the desired output file-name (in this case EPSON.iso). This command has literally hundreds of paramaters which are explained better than I would even attempt here.