Sender: root AT delorie DOT com Message-ID: <378365EE.208B74E7@inti.gov.ar> Date: Wed, 07 Jul 1999 11:36:31 -0300 From: salvador Organization: INTI X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: es-AR, en, es MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp-workers AT delorie DOT com Subject: Re: .align directives in libc.a References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > 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. > > I was thinking about doing the equivalent of ".balign 16,,7" between the > objects, if that's possible. That should bloat the library about 7K at > the maximum (we have less than 1000 modules). Ok, but currently binutils just align, I don't know how hard will be to achieve it. > Btw, won't ".balign 16,,7" near the entry into every function do the > same, without changing Binutils? (Of course, this leaves us with code > produced by GCC.) Nope, binutils assumes the current module starts at address 0 and doesn't know anything about the previous. This "address 0" is in fact aligned to an 8 bytes boundary. So now suppose you say .balign 16 before the first function and the real adress is 00008, now as the binutils thinks this address is 0 will not put any padding instructions and you'll end with an 8 bytes aligment and not 16 as you asked. The fact is that: "The aligment between modules is equal the maximun effective aligment you can get in the .text section" You can better, but just accidentally. So .balign 16,,7 needs binutils using 16 as aligment between modules. SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org set AT ieee DOT org set-soft AT bigfoot DOT com Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013