On 7 January 2014 10:00, Sandeepa Prabhu <sandeepa.pra...@linaro.org> wrote:

Hi Sandeepa,

> We are trying to build android Kitkat (for our own platform) using
> linaro android toolchain version
> 4.7.4 from 13.12 release. We are observing following while compiling
> some shared libraries:
>
> ~arm-linux-androideabi-4.7/bin/../libexec/gcc/arm-linux-androideabi/4.7.4/real-ld:
> warning: shared library text segment is not shareable
> ~arm-linux-androideabi-4.7/bin/../libexec/gcc/arm-linux-androideabi/4.7.4/real-ld:
> error: treating warnings as errors
>
> We tried to suppress thisn warning by setting LDFLAGS but the
> tool-chain does not seem to identify this flag:
>            LOCAL_LDFLAGS := --no-warn-shared-textrel
>
> We need some help to fix this, so posting on both android and
> tool-chain mailing lists.

It should be possible to run "arm-linux-readelf -r" on the shared
library to discover which symbol is being referenced with a
non-shareable relocation (i.e. a reloc that modifies the text segment)
from there you should be able to track down where that reference
occurs ("arm-linux-objdump -d" will help you find the
function/compilation unit where the reference is).

Usually the cause is either an assembly coding error or some code
being built without -fPIC.

-- 
Will Newton
Toolchain Working Group, Linaro

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to