Size of binaries.

Joe Buck Joe.Buck@synopsys.com
Fri Aug 2 14:43:00 GMT 2002


[ larger C++ executables when -g is used ]

> /u/sbin/faxgetty:	ELF 32-bit LSB executable 80386, dynamically linked, stripped, debug
> /u/sbin/faxgetty.old:	ELF 32-bit LSB executable 80386, dynamically linked, stripped, debug
> 	
> What might be causing this increase in binary size of about 350% (I see
> for all of Hylafax's binaries)?

The main source of the size increase is almost certainly the size of the
debug info for the classes from the standard library.  libstc++ v3 is
substantially larger, because it's a complete (ISO C++) implementation,
while the old library was missing many features, and used plain classes
in many places where templates are now required.

I don't know how much redundancy may exist in the debug info, I suspect
that there are opportunies for reducing the file size. But the priority
up to this point has been on getting a complete and correct C++
implementation, not on size optimization.

> I tried recompiling smail and tcsh, which were both last compiled almost
> a year ago.  The smail binary came out trivially different, while the
> tcsh binary was in fact a bit smaller.

They are C.



More information about the Gcc mailing list