My device does not load my own library; error message
java.lang.UnsatisfiedLinkError: dlopen failed: unknown reloc type 160 @ 0xa849dc64 (6010)
In fact , and it cannot be expected from the Android bootloader.160 R_SH_GOT32
This is a minimal code example:
#include <atomic>
#define N 3
struct S {
int a[N];
};
void qq() {
std::atomic<S> s;
s.exchange(S());
}
Please note that for the correct loading of the library is enough #define N 2.
I am using NDK r10e, testing on ARM 32 with the emulator installed in API 4.4.4 (API 19). I tried different toolchains: 4.8, 4.9 and clang. I tried gnustl_static and shared, as well as libC ++.
Does this smell resemble an error in NDK?
Update : using NDK 11 and clang toolchain, the linker just shows
NDK_ROOT / sources / cxx-stl / gnu-libstdC ++ / 4.9 / include / atomic: 233: error: undefined reference to '__atomic_exchange'