mylib.so有文本重定位。这是浪费内存,是一个安全隐患。请修正是一个、这是、安全隐患、文本

2023-09-12 22:01:12 作者:就算醉又怎样

我的Andr​​oid应用程序(使用本机库)的Andr​​oid 4.4系统打印这样的警告:

My Android application (using native library) print this warning on Android 4.4 :

链接mylib.so有文本重定位。这是浪费内存,是一个安全隐患。请修复。

linker mylib.so has text relocations. This is wasting memory and is a security risk. Please fix.

你有什么是和如何解决它的想法? 谢谢你,

Have you got an idea of what it is and how to fix it ? Thanks,

推荐答案

这似乎是在https://$c$c.google.com/p/android/issues/detail?id=23203

,并表示那里已经被固定为NDK-R8C的。

and stated there to have been fixed as of ndk-r8c.

这样看来,这个问题对于库检查已添加仅在最近

It would appear that the check for libraries with the issue has been added only recently.

请注意:请不要修改这个帖子隐藏链接的URL。这是明确的,因为目标是什么使得它具有权威性。

Note: please do not edit this post to hide the link URL. It is explicit because the destination is what makes it authoritative.

另外注意更改NDK版本是只修复时警告是由于应用程序的code。这将有没有影响如果该警告,而不是在一个系统组件,如libdvm - 这只能固定由一个系统更新

Further Note Changing NDK versions is only a fix when the warning is due to the code of your application. It will have no effect if the warning is instead on a system component such as libdvm - that can only be fixed by a system update.