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
ARM build creates broken PIC with TEXTREL #119
Comments
So is this the source of this warning in the Android logcat?
|
Yes, this is the source of this warning and many other problems |
@conchurnavid Why trying to build the core as a PIC shared library? IMO load-time relocation should be faster (at runtime) than PIC in this case. |
For example because the new dynarec arm code automatically enables PIC? Hardening? ... |
PIC is only enabled if using the -fPIC option at compile time, otherwise a non-PIC shared library is created. On android we're using non-PIC libraries. |
Android is even requiring -fPIE -pie for newer API levels. Also the standard toolchain setup of the NDK sets -fPIC or -fpic since ages for almost (all?) targets. Check toolchains/arm-linux-androideabi-*/setup.mk |
Yep you're right I totally missed this one, thanks for the info ;-) |
Lol the core library don't even link without PIC anyway, I now understand the issue here. Better late than never ;-) |
@conchurnavid in case you missed it @ecsv created a patch to fix the TEXTREL issue at Tested and working on android ;-) |
Thanks. I couldn't find a pull request. Created my own at #120 with the patch from Debian |
Thanks for creating the PR ;-) |
PR was merged but then the problem was reintroduced by 87b9b57 |
@richard42, @Narann this issue can be closed |
Thanks! |
Just tested on armhf with build script from https://launchpad.net/~random-stuff/+archive/ubuntu/ppa
The build contains TEXTREL (aka - which makes the .so a broken/not PIC shared object)
A valid PIC build is created when compiling without NEW_DYNAREC:
All broken instruction/definitions which require a relocation can be found in src/r4300/new_dynarec/arm/linkage_arm.S
The text was updated successfully, but these errors were encountered: