Date: Tue, 18 Sep 2001 11:24:42 +0300 (WET) From: Andris Pavenis X-Sender: pavenis AT ieva06 To: Eli Zaretskii Cc: djgpp-workers AT delorie DOT com Subject: Re: GCC 2.9x and 3.x produces larger code In-Reply-To: <9003-Tue18Sep2001100055+0300-eliz@is.elta.co.il> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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