您的位置:首页 > 其它

libxx.so has text relocations. This is wasting memory and prevents security hardening. Please fix

2016-04-06 13:24 811 查看
Root cause:

using the scanelf to scan the library, you can find the fllowing issue:

#scanelf -R . -qt

TEXTREL ./libxx.so

before the Android M(6.0), it is only one warning, while on Android N, it will cause the dlopen return failed.

1. first you should add the compile arg: -fPIC. (create the position independent code)

if it still have the TEXTREL section. you must tune your code, it s related with assembly code.

refer:

http://quabr.com/34691970/ffmpeg-for-android-neon-build-has-text-relocations

http://stackoverflow.com/questions/32346402/libavcodec-so-has-text-relocations

https://wiki.gentoo.org/wiki/Hardened/Textrels_Guide
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: