[x264-devel] x86: eliminate text relocation in asm

Jean-Philippe Jodoin jpjodoin at summit-tech.ca
Wed Mar 16 13:24:36 CET 2016


Hello,
I see that the x264 library was patched to support Android API 23 (Android 6)  on ARM by removing text relocation . 
https://mailman.videolan.org/pipermail/x264-devel/2015-October/011479.html

 It works fine on ARM but when I try to compile on x86 for Android, I have the same issue (Android 6 will refuse to link it because of text relocation).

I use this configure command:

./configure --host=i686-linux-android 
--cross-prefix=C:/android-ndk-r9d/toolchains/x86-4.6/prebuilt/windows-x86_64/bin/i686-linux-android
--sysroot=C:/android-ndk-r9d/platforms/android-14/arch-x86 
--disable-cli 
--enable-shared 
--disable-opencl 
--enable-pic

My understanding is that --enable-pic prevents text relocation in the C code, but there is still some hardcoded in the x86 ASM code.
Using scanelf -T, I see what seems to be 1030 text relocations with the current master branch.

Is there any way to fix this issue ?

Thanks,

Jean-Philippe




More information about the x264-devel mailing list