This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Where is the dead symbol eliminator patch?
- From: Ian Lance Taylor <ian at airs dot com>
- To: Mike Hearn <mike at plan99 dot net>
- Cc: binutils at sources dot redhat dot com
- Date: 30 Jul 2005 17:34:55 -0700
- Subject: Re: Where is the dead symbol eliminator patch?
- References: <pan.2005.07.30.22.25.09.31935@plan99.net>
Mike Hearn <mike@plan99.net> writes:
> When static linking a library, my copy of ld (Fedora Core 4, version
> binutils-2.15.94.0.2.2-2.1) seems to drop .o files that don't contain any
> used symbols - this is good. Unfortunately, only one symbol from that file
> being used is enough to link in the entire .o file, which is bad.
>
> ...
>
> I've been told Apple have written a patch to make this happen. Is this
> true? If so, does anybody know where I can find it?
I don't know what Apple has done.
What you want to do is compile with -ffunction-sections and link with
--gc-sections.
Ian