Upgrading to ndk 8b I receiving some crash report (most of them are Galaxy SII with Android 4.03)
java.lang.UnsatisfiedLinkError: Cannot load library: reloc_
Producing optimised NDK code for multiple architectures?
read about 'arm' vs 'thumb' in the accepted answer in the above link.
then, remove your config instructions to build for thumb and verify that you are building for arm...
OR...
ill make a wild guess ... its the library order you have in the linker statement in your 'Android.mk'
try the google forum for ndk ... searching for 'cannot locate symbol'...
Really desperate?
see 'Runtime errors' section here
Are you compiling for armv7? If you're not, try compiling for armv7.
The __gnu_thumb1_case_uqi
is a helper which does an indexed jump on a densely packed switch table; quickly implements the switch. You have two options: avoid it or link with it.
If you increase an optimization level (by using -O3
) you might not need this symbol. Also, changing the CPU may help as well as using thumb2
instructions. Compiling with the -ffreestanding
option may also avoid this symbol. If you have control over the switch statement, you can replace it with an array of function pointers.
This routine is inside libgcc. You can statically link libgcc. Somewhere in the Android SDK/compiler, there must be a libgcc.a
. Link with libgcc.a
, using -L
and -l
or use -static-libgcc
linker option to get the code (see http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html).
Edit: If you aren't compiling anything, then you can find libgcc.so
on your system. It might be in /lib
or /usr/lib
or perhaps some place weird for Android devices. Adding the directory where the libgcc.so
is located to the environment variable LD_LIBRARY_PATH
could also fix the problem. It maybe unfortunate that Samsung released incompatible binaries and you have no way to fix the issue if you aren't compiling your own code. The correct libgcc.so
maybe inside something like /usr/lib/thumb
for multi-lib distributions. I don't know much about the Davlik stuff, but the Android JVM might not pointing to the right set of libraries when it runs.