Non-PIE Binary - The executable 'project name' is not a Position Independent Executable.

安稳与你 提交于 2019-11-30 09:19:24

There is now a document from Apple explaining the issue and how to solve it: QA1788: Building a Position Independent Executable,

Steps for building your application as PIE

  1. In Xcode, select your target in the "Targets" section, then click the "Build Settings" tab to view its settings.

  2. For iOS apps, set iOS Deployment Target to iOS 4.3 or later. For Mac apps, set OS X Deployment Target to OS X 10.7 or later.

  3. Verify that Generate Position-Dependent Code is set at to NO.

  4. Verify that Don't Create Position Independent Executables is set to NO.

We're getting the same message on all of our app updates this week. You will need to set "Don't Create Position Independent Executables" to "NO" and "Generate Position-Dependent Code" to "NO", which is the default.

The key is that you will need to set "iOS Deployment Target" to 4.3 or later, or the PIE settings will be ignored.

You can test the app binary with this command and it will show "PIE" at the end of the line for a PIE exe. otool -vh MyAppExe

as mentioned here by Vincent, to have a PIE-Binary:

  • follow Apple Q&A QA1788
  • set deployment target to 4.3 as minimum OS version (this is a requirement for PIE-Binary)
  • (the missing bit): make sure you don't have a 3rd party library that would not be compatible with PIE-binary, otherwise the all project will not build for PIE-Binary.
  • check with: otool -hv /path/to/MyApp.app/MyApp

This said, Apple does not force you "YET" to have a PIE-Binary app. So the question is "will they force to do so ? and when ?"

_oho

more info: http://blog.hoachuck.biz/blog/2013/06/28/non-pie-binary-app-on-ios-could-lead-to-security-issue/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!