On Mar 9, 12:49 pm, Mattaku Betsujin <
mattaku.betsu...@gmail.com>
wrote:
> The error message in the linux dynamic loader is definitely misleading here
The Android dynamic loader has just the one error message for all
occasions.
From dalvik/vm/Native.c:
* The current android-arm dynamic linker implementation tends to
* return "Cannot find library" from dlerror() regardless of the
actual
* problem. A more useful diagnostic may be sent to stdout/
stderr,
* but often that's not visible. Some things to try:
* - make sure the library exists on the device
* - verify that the right path is being opened (the debug log
message
* above can help with that)
* - check to see if the library is valid
* - check config/prelink-linux-arm.map to ensure that the
library
* is listed and is not being overrun by the previous entry
(if
* loading suddenly stops working, this is a good one to
check)
These are a little old and framework-centric; in fact, it no longer
prints diagnostics anywhere, and the prelink map only matters if your
library is prelinked.
Debugging the failure to load a shared library is easiest if you
rebuild ld.so with debugging enabled and then run a trivial program
that calls dlopen() on the target library. (Whether or not this
qualifies as "easy" depends on your setup.) See bionic/linker/
linker_debug.h.
Using strace is a good idea.