This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: any "smart linking" efforts?
- To: "Eric Christopher" <echristo at twigboy dot cygnus dot com>
- Subject: RE: any "smart linking" efforts?
- From: "Cristi Vlasceanu" <cristiv at amazon dot com>
- Date: Mon, 12 Nov 2001 16:50:46 -0800
- Cc: <binutils at sources dot redhat dot com>
[Get raw message]
Thanks Eric.
The compiler / linker options suggested by 2) have a generous intent, but
they don't work with dynamic linking :(
Am I asking for an impossible to implement feature?
There seem to be linkers out there (for platforms that should remain
nameless) that are capable of garbage-collecting unused functions even when
the executable is dynamically linked against system libraries.
Also, the same linker can figure out when two functions are bitwise
identical (say two C++ template instantiations in different translation
units) and keep only one copy.
-- Cristi
> -----Original Message-----
> From: Eric Christopher [mailto:echristo@twigboy.cygnus.com]
> Sent: Monday, November 12, 2001 3:24 PM
> To: Cristi Vlasceanu
> Cc: binutils@sources.redhat.com
> Subject: Re: any "smart linking" efforts?
>
>
> > I am thinking mainly of
> > 1) being able to specify libraries in any order and only once
> in the linker
> > command line
>
> like --start-group --end-group?
>
> > 2) having the linker discard symbols that are never being
> referenced (maybe
> > with some help from the assembler?)
> >
>
> gcc -ffunction-sections / ld --gc-sections?
>
> -eric
>
> --
> Fridays are not "pants optional"
>