delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/08/02:47:00

Date: Thu, 8 Jul 1999 09:44:20 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: salvador <salvador AT inti DOT gov DOT ar>
cc: djgpp-workers AT delorie DOT com
Subject: Re: .align directives in libc.a
In-Reply-To: <37835FF7.2CAFA47B@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.990708094356.21287A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 7 Jul 1999, salvador wrote:

> > So we need to change the value in Binutils, to get proper alignment.
> 
> Yes but then we will bloat libc. As I said before not even M$ is aligning the
> run-time library in this way (16 bytes).

I tried to see how badly will we bloat the binaries with higher
alignment.  I compared two builds of djlsr202: one with the default
switches in gcc.opt and gcc-l.opt, which align everything to 4-byte
boundaries; for the other build, I changed all the -malign-* switches
to 4, i.e. 16-byte alignment.

The results were that libc.a got larger by 15K, libm.a got larger by
7K, and the programs in bin got larger by 100K.  This is a total of
120K bloat out of the 2.5MB-worth of files, or about 5%.

Note that I didn't have a linker configured to align code sections on
16-byte boundaries, which will bloat executables some more.  However,
since each function has several labels, I'd guess that the additional
bloat is on the order of 10%, that is 10K more.

So: does this seem like excess bloat?  I don't think so, but perhaps I
miss something.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019