This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Large code size?



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]