<div dir="ltr">Hello,<div><br></div><div>I'm trying to use x264 library on Android 6, and got the following error:</div><div><br></div><div><div><font face="monospace, monospace">java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.example.myapp.dev-2/lib/arm/libx264.so: has text relocations</font></div><div><font face="monospace, monospace">       at java.lang.Runtime.loadLibrary(Runtime.java:372)</font></div><div><font face="monospace, monospace">       at java.lang.System.loadLibrary(System.java:1076)</font></div></div><div><br></div><div>The following is my configure command:</div><div><br></div><div><div><font face="monospace, monospace">LIBX264_CFLAGS=" \</font></div><div><font face="monospace, monospace"><span class="" style="white-space:pre">     </span>--cross-prefix=arm-linux-androideabi- \</font></div><div><font face="monospace, monospace"><span class="" style="white-space:pre">     </span>--sysroot=$SYSROOT \</font></div><div><font face="monospace, monospace"><span style="white-space:pre">   </span>--prefix=$DEST \</font></div><div><font face="monospace, monospace"><span class="" style="white-space:pre">    </span>--host=arm-linux  \</font></div><div><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>--disable-cli \</font></div><div><font face="monospace, monospace"><span style="white-space:pre">        </span>--enable-pic \</font></div><div><font face="monospace, monospace"><span style="white-space:pre"> </span>--enable-shared \</font></div><div><font face="monospace, monospace"><span style="white-space:pre">      </span>--disable-avs"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">./configure $LIBX264_CFLAGS</font></div></div><div><br></div><div>It works well on Android 4.x/5.x, and the linker process only report a warning about text relocations.<br></div><div><br></div><div>As per my understanding, <font face="monospace, monospace">enable-pic</font> should omit the text relocation issue, but it doesn't. It seems there're some hardcoding textrel in ASM code.</div><div><br></div><div>Is there any way to fix this issue? Or any workaround to it?</div><div><br></div><div>Thanks,</div><div>Simon.</div></div>