• 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: dead-code stripping, is it possible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dead-code stripping, is it possible?


  • Subject: Re: dead-code stripping, is it possible?
  • From: Marshall Clow <email@hidden>
  • Date: Tue, 1 Jun 2004 10:39:38 -0700

At 9:24 AM -0700 6/1/04, Kevin Hoyt wrote:
Hi All,
From the 'Optimizing your code footprint: managing code size'
documentation:

[ Some random verbiage about how dead-code stripping is bad ] Note that this applies mostly to Objective-C code, not C or C++.

If you are building a shared library, all your code should be linked
via one of the entry points.

let's just focus on one line in this...
If the static linker were to strip this code, the dynamic linker would
generate runtime errors for any external program trying to link to it.

Now let's say that I don't care if other applications fail if they attempt
to link against my statically linked binary...

I feel that way too.

Is it possible to have the linker strip dead code?  Is there an option to
enable this?

As far as I know, there is no such option. I really wish there was.

The Metrowerks Mach-O linker does do dead-code stripping.
--
-- Marshall

Marshall Clow     Idio Software   <mailto:email@hidden>

I want a machine that thinks I'm more important than it is, and acts like it.
-- Eric Herrmann
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: compiler flags
  • Next by Date: Build Variants, building and keeping both versions?
  • Previous by thread: Re: dead-code stripping, is it possible?
  • Next by thread: Re: dead-code stripping, is it possible?
  • Index(es):
    • Date
    • Thread