dead-code stripping, is it possible?
dead-code stripping, is it possible?
- Subject: dead-code stripping, is it possible?
- From: Kevin Hoyt <email@hidden>
- Date: Tue, 1 Jun 2004 09:24:38 -0700
Hi All,
From the 'Optimizing your code footprint: managing code size'
documentation:
"For statically-linked executables, dead-code stripping is the process of
removing unreferenced code from the executable file. The idea behind
dead-stripping is that if the code is unreferenced, it must not be used
and therefore is not needed in the executable file. Tools on many other
platforms handle dead-code stripping automatically during the link phase.
However, this behavior is not really appropriate for Mac OS X tools. The
dynamic nature of Mac OS X means that even unreferenced code in an
application can be linked to and used by another program at runtime. 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. "
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...
Is it possible to have the linker strip dead code? Is there an option to
enable this?
Kevin Hoyt
_______________________________________________
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.