Finding dependencies of a compiled library on Unix
Is there a way to find names of libraries that a given library depends on?
Basically I have an ".so" file that I load dynamically, and I know all the other .so 开发者_开发知识库files that it's going to try to load
Update 07/07: I found /proc//maps pretty useful, it gives locations of loaded dynamic libraries for a given process
Type readelf -a <PATH-TO-LIBRARY> | grep 'NEEDED'
in your terminal.
Note: readelf
is part of binutils.
精彩评论