• 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 symbols and dead-code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stripping symbols and dead-code


  • Subject: Re: stripping symbols and dead-code
  • From: Eric Albert <email@hidden>
  • Date: Thu, 17 Nov 2005 09:57:28 -0800

On Nov 17, 2005, at 7:14 AM, Frode wrote:

I'm using XCode 2.2, gcc-4.0.0, ld version "cctools-590.obj~12".

Xcode 2.2 shipped with gcc 4.0.1, so I hope that's a typo above.

0. Is there any reason to dead-strip (ld's -dead_strip) instead of
symbol-strip (ld's -s or strip)?

They do different things. Dead code stripping removes code that isn't referenced. Symbol stripping removes debug information.


1. Is there any option to activate symbol-stripping besides dead-code
stripping in the build settings, besides adding -Wl,-s to "Other Linker
Flags"?

Deployment Postprocessing will do this for you. There may be other options which do it, too.


2. Why do I get an error if I use both symbol and dead-code stripping? I
pass the -Wl,-s and -Wl,-dead_strip to g++-4.0 (in "Other Linker
Flags"). The error is


/usr/bin/ld: internal error: assign_output_symbol_indexes() inconsistent
local symbol counts
collect2: ld returned 1 exit status

Sounds like a bug. Please file a bug report.

3. Why does code becomes bigger if I both symbol-strip and dead-strip?
Compare this:

(All numbers in bytes)
no strip
10,176,979	

dead-code strip
9,167,015

symbol strip
1,513,115

dead-code strip, then symbol strip (using strip)
1,595,959

The most efficient in my case seems to be the symbol strip. There are
about 80 kB extra if I both dead-strip and symbol-strip.

Symbol stripping with strip is different from symbol stripping at link time. In particular, the linker has additional information about the layout of your executable that strip doesn't have, so it can strip slightly more.


Hope this helps,
Eric

_______________________________________________
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


  • Follow-Ups:
    • Re: stripping symbols and dead-code
      • From: Jens Miltner <email@hidden>
    • Re: stripping symbols and dead-code
      • From: "Frode" <email@hidden>
References: 
 >stripping symbols and dead-code (From: "Frode" <email@hidden>)

  • Prev by Date: Re: XCode 2.2 can't find framework
  • Next by Date: Re: Xcode2.2 and gcc-3.3 "multiple compilations" error
  • Previous by thread: stripping symbols and dead-code
  • Next by thread: Re: stripping symbols and dead-code
  • Index(es):
    • Date
    • Thread