I have 2 shared libraries: lib1.so and lib2.so.
lib1.so contains some functions which are defined in lib2.so. From a C program I load lib1.so using following call:
dlopen( "lib1.so", RTLD_NOW );
Both libraries are presented in the current directory. My program works under a desktop Linux (Ubuntu, Debian), but not under Android. Under Android dlopen returns an Error and exits. I tried to set:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
but it doesn't help.
I am totally confused, why this code doesn't work under Android. I cannot find any good documentation on Android's dynamic linker. So, I have no explanation why it doesn't work.
DETAILS:
- Android with Linux kernel 2.6.35 armv7l
- objdump shows lib1.so needs libc.so and lib2.so
- objdump shows lib2.so needs only libc.so