This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Large code size?
- To: slouken at devolution dot com (Sam Lantinga)
- Subject: Re: Large code size?
- From: Joe Buck <jbuck at Synopsys dot COM>
- Date: Wed, 24 Mar 99 15:53:19 PST
- Cc: hjl at lucon dot org, slouken at devolution dot com, egcs at egcs dot cygnus dot com, mindbender at lokigames dot com
> 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?
(If you were building an executable and multiple .o files use,
say, vector<int>, more than one .o file would have a definition
of some of the vector<int> functions but the GNU linker would
eliminate all but one copy. I don't think this works for shared
libraries, though I may be wrong).