Sender: root AT delorie DOT com Message-ID: <37836D80.940DCA74@inti.gov.ar> Date: Wed, 07 Jul 1999 12:08:48 -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: > > > 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. > > So this means that all the .align directives in the current libc sources > are useless, right? No if they are 8 or less ;-). But yes if you use 16. > And the same goes for the .align directives emitted > by GCC, for function entry points and labels? They are normally 8 bytes or less for djgpp. Let me see what about gcc 2.96 new experimental optimization branch .... Wow! it uses .align 16 by default for Linux (-O9 just in case ;-), let me see a loop ... .p2align 4! for entry points of loops. I know for sure gcc 2.95 for DOS doesn't do it, this compiler I'm testing is very experimental and according to people in the egcs list should beat MSVC 6.0. I didn't time to run the benchmarks with it. Is not very smart with the function starts (pushing all :-( 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