Mail Archives: djgpp-workers/2001/06/21/07:36:15
On 21 Jun 2001, at 14:12, Eli Zaretskii wrote:
>
> On Thu, 21 Jun 2001 pavenis AT lanet DOT lv wrote:
>
> > > > after 'gpp -O2 hello.cc -o hello.exe' I'm getting the size of executable
> > > > (with gcc-3.0) size 1182238 bytes, after stripping it - 257536 bytes and
> > > > after compressing it with UPX 1.20 (option --best): 91068 bytes
> > >
> > > What is the size of unstripped executable when libgcc.a is unstripped, as
> > > opposed to stripped libgcc.a?
> >
> > gcc-3.0, both libgcc.a and libstdxx.a stripped:
> > original: 858371 stripped: 255488 packed with UPX: 91008
>
> So it looks like the size of the program is not an important reason for
> stripping libgcc.a: these numbers show that only about 30% of the
> executable's size is due to the debugging info in both libstdc++ and
> libgcc combined. That is, most of the bloat comes from the code
> generated by the compiler, not from the library debug info.
>
> The size of the file libgcc.a is a more important argument.
If we're talking about size of binary archives then the change of total
size is less than 10%. Original sizes:
G7730B ZIP 1 618 945 21.06.01 13:29 g7730b.zip
GCC30B ZIP 2 305 071 21.06.01 13:29 gcc30b.zip
GPP30B ZIP 2 414 441 21.06.01 13:29 gpp30b.zip
OBJC30B ZIP 1 152 208 21.06.01 13:29 objc30b.zip
4 file(s) 7 490 665 bytes
The same after stripping debug info from libraries
G7730B ZIP 1 571 842 21.06.01 14:20 g7730b.zip
GCC30B ZIP 2 235 735 21.06.01 14:20 gcc30b.zip
GPP30B ZIP 2 267 709 21.06.01 14:21 gpp30b.zip
OBJC30B ZIP 1 081 127 21.06.01 14:21 objc30b.zip
4 file(s) 7 156 413 bytes
Of course decrease of size of libraries is more significant:
libgcc.a 1555760 66976
libstdcxx.a 2002464 1285804
libsupcxx.a 211392 132006
libg2c.a 1423106 308500
libobjc.a 505686 188092
- Raw text -