Skip to content

Month: November 2014

determine the libraries / files that an executable is using!!

ldd   <path/executablename>  lists what libraries it is looking for (or currently using)

ltrace <executablename programarguments>   traces what executable is doing with libs and other stuff and if it gets stuck there’s your problem.  (Note this actually runs program which is why input params are needed)

strace <executablename programarguments> show files opening and closing. This also requires running the program. Since the output is extremely lengthy you might want to save it to blablabla.txt by

$strace -o blablabla.txt <executablename programarguments>

If you want to just trace specific system calls (for example open,read since you are interested in what the program is using) you can type

$strace -e open,read <executablename programarguments>

This will give only open and read calls.

-Yuping Huang