help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC -- reducing compiled code size


From: Paul Pluzhnikov
Subject: Re: GCC -- reducing compiled code size
Date: Mon, 23 Jul 2007 11:05:54 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Ignoramus3627 <ignoramus3627@NOSPAM.3627.invalid> writes:

> We have a library that has 179385 lines of code. 
> With GCC, no debug information requested (no -g option) it creates a
> 31 meg long .a library file. 
>
> I think that it is excessive. Any idea what I can do to reduce the
> size?

You can try to understand where that size comes from -- extract a
couple of .o files from the library, and examine what they are
comprized of (exact commands for this are system specific, and you
provided no clues what your platform might be).

It is likely that you have many template instances repeated into
every .o. When you link final executable, only one copy is linked
in on most platforms, so the size of lib*.a is usually of little
concern (disk space is cheap).

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]