I have compiled a JNI library for Android with the NDK that statically links against a libcrypto.a that I have compiled using this project, https://github.com/fries/android-external-openssl which dynamically links against libdl.so.
Even though the NDKs platforms/android-x/arch-arm/usr/lib directory has a libdl.so for every version of android when I try to load my library on Android 2.1 I get the following error:
Trying to load lib /data/data/package.name/lib/libmylibrary.so 0x44e83a28
Unable to dlopen(/data/data/package.name/lib/libmylibrary.so): Cannot load library: reloc_library[1244]: 30 cannot locate 'dladdr'...
and then proceeds to crash with an UnsatisfiedLinkError, but on 2.2+ my native library links and works perfectly
any thoughts on what is happening to me or how to fix it?
So while looking into this problem I have discovered that while libdl exists in all versions of android dladdr() was added to the C library in 2.2
the relevant lines of the NDK changes.html are as follows: