Re: Strip doesn't strip
Re: Strip doesn't strip
- Subject: Re: Strip doesn't strip
- From: Quincey Morris <email@hidden>
- Date: Fri, 23 Dec 2016 10:27:44 -0800
- Feedback-id: 167118m:167118agrif8a:167118sg9aOHzKtB:SMTPCORP
On Dec 23, 2016, at 07:02 , Andreas Falkenhahn <email@hidden> wrote:
In my iOS project, I have set "Strip debug symbols during copy" to YES for release, I have set "Strip linked product" to YES and I have also set "Strip style" to "All symbols". The scheme is set to "Release". Xcode version is 8.2.
Yet, when opening the main executable with a hex editor, I can still see the names of all global functions and variables. Why aren't those stripped properly?
debug symbol != public symbol
If you want to hide public symbols, you need to control their visibility using compiler directives and linker options. Even worse, examining the executable using a hex editor also reveals other confidential information like path and user names and other stuff directly from my build machine. Why is all that included in a *Release* build?
This is indeed a potential security violation in the build system. Exception and assertion messages may try to display the “name” of the source file where an error occurs, and (presumably to disambiguate file names on different paths) the name includes the full path. (Swift code doesn’t have this problem. Release versions don’t produce any message text at all in these circumstances, and the related constant strings don’t exist in the executable.)
However, I wonder if maybe you’re omitting a step. It is not sufficient to simply build a Release configuration of your app, to produce a release version. Instead, you should run an Archive step (Product menu), then extract the built app from the archive in the Organizer window. It’s not clear that Xcode honors all of the deployment settings when doing a Build rather than an Archive. It’s also not entirely clear how Xcode handles deployment settings for iOS apps, since iOS apps have always had more restrictive build requirements than Mac or Unix apps.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden