• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stripping executable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stripping executable


  • Subject: Re: Stripping executable
  • From: Citizen <email@hidden>
  • Date: Mon, 05 Sep 2011 08:16:35 +0100

On 5 Sep 2011, at 07:47, Robert Bielik wrote:

I'm trying to get my binary stripped of symbols, but no matter what I've chosen, i.e. STRIP_INSTALLED_PRODUCT/STRIP_STYLE/DEPLOYMENT_PROCESSING
visibility=hidden,inlines hidden etc. etc., my binary still is PEPPERED with symbols. I'm using Xcode 3.2.2 with gcc 4.0.

What to do ?

As I understand it there will always be some symbols around, it's just the ones you created that get removed. It may be a good idea to use the nm command before attempting stripping and then after - to see what's going on.
 
The following instructions are from my notes, and work for me. Someone else may be able to tell you if I was doing anything wrong...

---
You can use the NM command line tool to examine your code’s symbol table before and after stripping. The command takes the basic form:

nm -a /FullPath/Bundle.app/Contents/MacOS/Executable

To dead-code strip from the compiler:
  1. Select the project icon in Groups & Files
  2. File > Get Info
  3. Choose the Build tab
  4. Configuration: Release
  5. Show: All Settings
  6. In the search field type “strip”

Use the following settings (some may be on already):

Title
Name
Value
Deployment Postprocessing
DEPLOYMENT_POSTPROCESSING
√
Strip Debug Symbols During Copy
COPY_PHASE_STRIP
√
Strip Linked Product
STRIP_INSTALLED_PRODUCT
√
Strip Style
STRIP_STYLE
All Symbols
Use Separate Strip
SEPARATE_STRIP
√
Dead Code Stripping
DEAD_CODE_STRIPPING
√

There may be some Crate Worship here, but these settings do seem to produce the desired results.

Warning: Check that these settings are set for the target level.

Warning: To prevent warnings change "Debug Information Format" to "DWARF with dSYM File"

The strip command line tool may also be used to dead-code strip an executable:

strip -S -x /FullPath/Bundle.app/Contents/MacOS/Executable

Although this is effective it does not seam to work quite as well as the build method.
---

Hope that helps,
Dave

------
David Kennedy (http://www.zenopolis.com)

 _______________________________________________
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

References: 
 >Stripping executable (From: Robert Bielik <email@hidden>)

  • Prev by Date: Stripping executable
  • Next by Date: Re: Stripping executable
  • Previous by thread: Stripping executable
  • Next by thread: Re: Stripping executable
  • Index(es):
    • Date
    • Thread