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

libc++_shared (both hard float abi variants) fail to load properly #39

Closed
thalosii opened this issue Mar 22, 2016 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@thalosii
Copy link

I've checked both the r11 and r10d releases of the libc++ library, and i'm pretty sure both suffer from the same issue.

Essentially they fail to resolve the symbol __aeabi_d2lz (note: this is only true for hard float abi variants - including the thumb hard float variants).

I've been able to work around it on some versions of android by providing a little shim library that pulls in this define from libgcc.a before attempting to load libc++shared but unfortunately this little trick doesnt seem to work on older variants of android. I'm guessing my only option might be to try and recompile the libc++ library. Anyways, just wanted to bring this up as an issue.

this a super simple repro... just call LoadLibrary("c++_shared")... and you should see the issues...

@DanAlbert DanAlbert self-assigned this Mar 22, 2016
@DanAlbert DanAlbert added this to the r12 milestone Mar 22, 2016
@DanAlbert
Copy link
Member

If I had to guess, this is already fixed in r12 by the rearranging I did to how be build libc++. It used to be built by some awful shell script, but now it's actually built by ndk-build. The old shell script must have been missing the linker flag for disallowing undefined symbols, because otherwise it should have complained at build time.

The other alternative here is that we build it against a libc.so that claims to have that symbol, but the device you're running on doesn't actually contain it.

I'll try to find some time to verify this in r12.

@DanAlbert
Copy link
Member

I haven't had time to check this myself, but you can try https://github.com/android-ndk/ndk/wiki#current-beta-release

@DanAlbert
Copy link
Member

Hard float ABIs were removed.

@2php
Copy link

2php commented Oct 24, 2017

@DanAlbert How to enable -mfloat-abi=hard?

@DanAlbert
Copy link
Member

You don't. You can tag specific functions with __attribute__((pcs("aapcs-vfp"))) if you want those functions to be invoked with the alternate function call ABI.

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

No branches or pull requests

3 participants