Examples

unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stdin@@GLIBC_2.17'

记录编译的时候出现的问题:

/opt/hisi-linux/x86-arm/aarch64-himix100-linux/host_bin/../lib/gcc/aarch64-linux-gnu/6.3.0/../../../../aarch64-linux-gnu/bin/ld: libcrypto.a(cryptlib.o)(.text+0x774): 无法解决 R_AARCH64_ADR_PREL_PG_HI21 重定向于符号 “stderr@@GLIBC_2.17” 有冲突
/opt/hisi-linux/x86-arm/aarch64-himix100-linux/host_bin/../lib/gcc/aarch64-linux-gnu/6.3.0/../../../../aarch64-linux-gnu/bin/ld: 最后的链结失败: 错误的值
collect2: error: ld returned 1 exit status
make[4]: *** [link_a.gnu] 错误 1

 

解决方法:

vi Makefile,在CFLAG 后面追加 -fPIC

posted on 2021-02-02 11:06  足各火丁  阅读(8219)  评论(0编辑  收藏  举报

导航

Examples