【问题标题】:Problem building Position independent executable for android为android构建与位置无关的可执行文件的问题
【发布时间】:2019-02-23 23:16:07
【问题描述】:

我正在为 arm-linux-androideabi 构建 openssl-1.0.1g,如 wiki.openssl.org 中所述,我的 Android 目标需要运行与位置无关的可执行文件。我在 Makefile 中添加了 -fPIE 和 -pie,现在我可以看到 Elf 文件类型是 DYN(共享对象文件),但是当我将文件复制到目标并尝试运行它时,我收到以下消息;

WARNING: linker: ./openssl has text relocations. This is wasting memory and prevents security hardening. Please fix.
CANNOT LINK EXECUTABLE: cannot locate symbol "__exidx_end" referenced by "./openssl"...

非常感谢任何想法这些消息的含义以及如何解决它们。

【问题讨论】:

    标签: android c openssl


    【解决方案1】:

    看来我只需要链接 libc 来定义这个符号。

    【讨论】:

      猜你喜欢
      • 2015-08-10
      • 1970-01-01
      • 2015-08-17
      • 1970-01-01
      • 2020-05-03
      • 1970-01-01
      • 2015-04-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多