[英]How to get dependencies list for .so file?
Let's say i'm having libFoo.so
compiled for android (arm). 假设我正在为android(arm)编译libFoo.so
。 I'm not sure what STL implementation it was linked to (there are options ). 我不确定它链接到哪个STL实现(有选项 )。 How can i get dependencies (as .so list) for it to understand what files i should provide and load using System.load(...)/loadLibrary(...)
? 我怎样才能获得依赖关系(如.so列表),以便了解我应该提供哪些文件并使用System.load(...)/loadLibrary(...)
加载?
You can use the objdump
tool and filter out the relevant part. 您可以使用objdump
工具并过滤掉相关部分。 In this case, eg arm-linux-androideabi-objdump -p libFoo.so | grep NEEDED
在这种情况下,例如arm-linux-androideabi-objdump -p libFoo.so | grep NEEDED
arm-linux-androideabi-objdump -p libFoo.so | grep NEEDED
. arm-linux-androideabi-objdump -p libFoo.so | grep NEEDED
。
The ldd
tool as suggested normally also does this, but it tries to actually find all the files that would be loaded, and it is not always available in cross-compilation environments. 建议的ldd
工具通常也ldd
,但它会尝试实际查找要加载的所有文件,并且在交叉编译环境中并不总是可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.