PIE disabled. Absolute addressing not allowed in code signed PIE
Asked Answered
P

1

7

I'm working with Xcode 4.5 with a deployment target of iOS 5.1

I'm getting the following warning when I compile my app in relation to two specific methods which have significantly increased in size.

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

And subsequently the app is throwing an exception at launch with the following error:

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

When I comment out the methods in question, the app runs fine.

Any suggestions?

Porphyry answered 25/12, 2012 at 7:26 Comment(0)
V
7

Here is a response from the Unity forums:

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

Credits go to amit-chai

Vasectomy answered 16/7, 2013 at 11:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.