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: i386 backend


biswapesh.chattopadhyay@bt.com writes:

> > Most of the bulk seemed to be exception handling and 
> > debugging information.
> 
> No, gcc-generated code (esp. C++ code) is quite a bit bigger than that of
> VC++ even using -Os -s -fno-exceptions -fno-rtti (correct me if I have
> missed something). Even 5 liners.

Then you probably configured your g++ to link in the C++ libraries 
statically. VC++ uses DLLs for that.

A better check would be to compile some object files with both VC++ 
and g++ and compare their text/data size using size object.o and 
the equivalent command under VC++ (I don't know what it is called, but
it surely exists)  This way you make sure you're not fooled by libraries.

Pre gcc3 g++ also generates very long mangled names, which can make the
the object files or unstripped executables look very big. If you strip it
you can get rid of most of these symbols. An exception are shared libraries
where you cannot get rid of all symbols, gcc3 with its new mangling scheme
will hopefully do better there. Even then shared library symbol tables tend 
to get paged out very quickly, they usually are not needed for most of runtime.

-Andi


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