This is the mail archive of the
mailing list for the GCC project.
Re: Size of binaries.
- From: Joe Buck <Joe dot Buck at synopsys dot com>
- To: jpr at jpr dot com (Jean-Pierre Radley)
- Cc: hylafax-users at hylafax dot org, gcc at gcc dot gnu dot org (GCC Developers)
- Date: Fri, 2 Aug 2002 14:43:08 -0700 (PDT)
- Subject: Re: Size of binaries.
[ 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.