4ntoine
4ntoine

Reputation: 20432

How to get dependencies list for .so file?

Let's say i'm having libFoo.so compiled for android (arm). I'm not sure what STL implementation it was linked to (there are options). How can i get dependencies (as .so list) for it to understand what files i should provide and load using System.load(...)/loadLibrary(...)?

Upvotes: 6

Views: 14431

Answers (1)

mstorsjo
mstorsjo

Reputation: 13317

You can use the objdump tool and filter out the relevant part. In this case, e.g. 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.

Upvotes: 16

Related Questions