为Android

时间:2018-09-19 17:54:35

标签: android c openssl

我正在按wiki.openssl.org所述为arm-linux-androideabi构建openssl-1.0.1g,并且我的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"...

任何想法,这些消息意味着什么以及如何解决它们,都将受到赞赏。

1 个答案:

答案 0 :(得分:0)

似乎我只需要链接libc来定义该符号。