What is the correct Xcode parameter for independent position records

More recently, I began to receive mail at appstore followed by advice.

Please make sure your build settings are configured to create PIE executables.

However, the setting in Xcode is displayed correctly. In the link section, I found

"Do not create independent position executables" set to NO.

(Double negatives YUK).

+4
source share
2 answers

You may receive this warning from Apple, not because your application is on its own, but because it is a third-party library that has not been compiled as a PIE. For example, if you use the Marmalade SDK Engine, you will receive this warning (they will fix it in September).

But you can try adding more compiler flags to your build settings:

In other C flags, you can put the flag: -fPIC

In Other warning flags you can put: -Wl, - emit-relocs and -Wl, - warn-shared-textrel

To find out if your application is PIE:

otool -hf /path/to/your/App.app/app 

Link: https://developer.apple.com/library/ios/qa/qa1788/_index.html

+2
source

I got an answer from Apple using

Non-PIE Binary - ProductManualApp.app executable file is not position independent. Make sure your build settings are configured to create PIE executables.

From my research conducted by Google, many people have said that this is related to "Do not create independent executable elements of the position." I think it should be the default, and this is "No"

0
source

Source: https://habr.com/ru/post/1480437/


All Articles