shared library text segment is not shareable

╄→гoц情女王★ 提交于 2019-11-30 12:30:35

Update:

from Android NDK r11 you can use

LOCAL_LDLIBS += -Wl,--no-warn-shared-textrel

You can also use

LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true

Previous answer:

This is a recent change in toolchain which treats this warning as an error.

One workaround is to add --no-warn-shared-textrel to LOCAL_LDFLAGS to disable treating warning as an error. You can do that in your Android.mk like

LOCAL_LDFLAGS := --no-warn-shared-textrel
mossbosscoder

Workaround for Android NDK r11:

LOCAL_LDLIBS += -Wl,--no-warn-shared-textrel

LOCAL_LDLIBS is applied later in the option chain than LOCAL_LDFLAGS, and consequently overrides the default.

For asop project(eg: aosp/external/myproject/)

add this line to your android.mk

LOCAL_CPPFLAGS += -w -frtti

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!