2012-12-25 28 views
5

我的工作和Xcode 4.5与iOS 5.1的部署目标禁用PIE。绝对寻址不允许在代码签署PIE

我得到以下警告,当我编译我的关于应用已显著增加两个具体方法在尺寸方面。

ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in -[mfile method]. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

而随后该应用程序在启动并出现以下错误抛出异常:

dyld: vm_protect(0x00001000, 0x0078C000, false, 0x07) failed, result=2 for segment __TEXT in /var/mobile/Applications/8E764612-87ED-4A99-9C59-E56C934DA997/appname.app/appname

dyld dyld_fatal_error:

0x2feb20c4: trap

0x2feb20c8: nop

当我注释掉问题的方法,应用程序运行正常。

有什么建议吗?

回答

5

这里是统一论坛上回应:

In xcode 4.6 build settings change "Dont create position independent executables" from NO to Yes, thats it.

现金去阿米特齐