Large code size?

Joe Buck jbuck@Synopsys.COM
Wed Mar 24 15:54:00 GMT 1999


> 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).


More information about the Gcc mailing list