仿生工具链ld可重定位目标文件问题

时间:2016-09-14 13:39:34

标签: android arm cross-compiling grpc bionic

我正在尝试为Arm-android交叉编译GRPC C ++,在链接一些库时我从ld得到了这些错误:

    arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/client/client_context.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
    arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/server/server.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
    arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/util/status.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
    src/cpp/client/client_context.cc:55: error: undefined reference to '__dso_handle'
    include/grpc++/impl/codegen/status.h:53: error: undefined reference to '__dso_handle'
    include/grpc++/impl/grpc_library.h:61: error: undefined reference to '__dso_handle'

有谁知道这个错误的原因是什么? .cc文件都使用-fPIC标志进行编译。

0 个答案:

没有答案