ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic)
参考了“AnyChat使用攻略之iOS开发指南 ”,编译工程时出现如下警告,请问是否有影响?ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in l010 from ../../sdk/libs/libx264.a(pixel-a.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_piePS:只是有上面这个警告,但还是可以正常运行,可以出来视频。您好,关于PIE是指position independent executable,即地址无关exe,换句话说也就是生成的机器码中不能出现lea rax, some_symbol_name这样的绝对寻址,而只能以:lea rax, 这种形式出现,目的是为了提高安全性,这样OS可以以随机的地址加载exe。
去掉CFLAGS中的-mdynamic-no-pic后重新编译工程即可将警告去除:
targets-->build Settings-->Linking-->Don't create Position Independent Executables 设置为YES【默认为No】警告自然消除
谢谢,已经没有警告了!
你们的技术服务很到位哈,赞一个,:victory:
页:
[1]