I'm writing a native lib (mylib.so) for Android, using the NDK. Mylib.so depends on libssl.so.
The Android NDK doc tells me I shouldn't use libssl.so from system/lib, because it's not part of the stable API. Instead I should cross-compile libssl myself and add it to the NDK.
But I see that mylib.so get automatically linked with system/lib/libssl.so because the dalvik vm (which is loading mylib.so) already depends on libssl.so.
$ readelf -d /system/bin/dalvikvm | grep Shared
0x00000001 (NEEDED) Shared library: [libdvm.so]
0x00000001 (NEEDED) Shared library: [libssl.so]
0x00000001 (NEEDED) Shared library: [libz.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x00000001 (NEEDED) Shared library: [libstdc++.s
0x00000001 (NEEDED) Shared library: [libm.so]
So what is the correct way to deal with this? Using system/lib/libssl.so anyway?
Thanks