Mail Archives: djgpp-workers/2001/09/18/04:42:45
On Tue, 18 Sep 2001, Eli Zaretskii wrote:
> Charles noticed that latest versions of GCC produce code that is about
> 12% larger than GCC 2.7.2.1 used to generate. For example, building
> Make 3.79.1 with GCC 3.0.1 produces a 232KB stripped executable,
> whereas the binary produced by GCC 2.7.2.1 is only 203KB (with the
> same library).
>
> Is this a known problem? Can someone explain the additional bloat, or
> at least list the possible reasons for it (i.e. changes in GCC code
> generation and/or optimizations)?
>
I think one of the reasons is code and data alignment. For example
gcc-3.0.1 Linux to DJGPP cross-compiler generates:
'.p2align 4' before procedure code
'.p2align 4,,7' in some other places inside procedure (like
before then begin of loop)
These alignment instructions are generated also by gcc-2.95.3, so I think
it would be more correct to compare with that version when compiler
options for optimizing size are being used.
Andris
- Raw text -