Monday 8 September 2008

Dynamic library dependencies - direct or not?

So you're looking at some (Linux) binary and wondering what libraries it uses - You can use ldd to list all the dependencies:
ldd /path/to/your/app
However this shows direct and indirect (i.e. those needed by other libraries) dependencies, so you can tell what are just the direct dependencies by using readelf:
readelf -d /path/to/your/app
The direct dependencies are the libraries listed as NEEDED.

No comments:

Post a Comment