Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libatomic.a contains relocs unknown to old android linker #66

Closed
cjhopman opened this issue Apr 4, 2016 · 1 comment
Closed

libatomic.a contains relocs unknown to old android linker #66

cjhopman opened this issue Apr 4, 2016 · 1 comment

Comments

@cjhopman
Copy link

cjhopman commented Apr 4, 2016

Android linker <5.0 does not understand R_386_IRELATIVE. The gcc toolchain will use this for functions with ifunc attribute.

The ndk's libatomic uses the ifunc attribute and thus this relocation. Code like the following:

uint64_t a = 0, b = 0;
__atomic_store(&a, &b, __ATOMIC_SEQ_CST);

compiled w/ clang will fail to load on android <5.0 with error like:
java.lang.UnsatisfiedLinkError: dlopen failed: unknown reloc type 42 @ 0xa869f454 (75)

@DanAlbert
Copy link
Member

Dup of #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants