This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Large code size?
- To: Sam Lantinga <slouken at devolution dot com>
- Subject: Re: Large code size?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 25 Mar 1999 11:24:14 -0800
- Cc: egcs at egcs dot cygnus dot com
- References: <E10QEEh-0002N2-00@roboto.devolution.com>
>>>>> Sam Lantinga <slouken@devolution.com> writes:
>> >>>>> Joe Buck <jbuck@Synopsys.COM> writes:
>> >> We built robotcom.so with the compiler flags:
>> >> g++ -O2 -funroll-loops -fno-exceptions -DLINUX_BETA -D_REENTRANT
>> >> and the linker flags:
>> >> cc -shared -nostartfiles -s -o robotcom.so ...
>> > Hmm. Does the gnu.linkonce trick work for shared libraries?
>> I would think so, but it certainly doesn't work if you don't use the GNU
>> linker, and 'cc' isn't likely to.
> On our system cc --> gcc
Then it should be OK.
> What is this gnu.linkonce trick? Is it automagically used by gcc?
The compiler puts template instantiations into separate sections, and the
linker discards duplicates. Yes.
Jason