shared library text segment is not shareable

前端 未结 3 1400
伪装坚强ぢ
伪装坚强ぢ 2021-01-02 02:29

I am trying to add HW video acceleration to a cm10.2 port for my device. I get no errors but the one below, then make stops working, apparently without any erro

相关标签:
3条回答
  • 2021-01-02 03:08

    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.

    0 讨论(0)
  • 2021-01-02 03:16

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

    add this line to your android.mk

    LOCAL_CPPFLAGS += -w -frtti

    0 讨论(0)
  • 2021-01-02 03:28

    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
    
    0 讨论(0)
提交回复
热议问题