Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Eli Zaretskii , djgpp-workers AT delorie DOT com Date: Tue, 6 Oct 1998 09:47:53 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Default alignment In-reply-to: X-mailer: Pegasus Mail for Windows (v2.54) Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > If I understand correctly the message by Ian Taylor (below), it would > be a good idea to define COFF_DEFAULT_SECTION_ALIGNMENT_POWER to make > executable be aligned on more than 4 bytes (is 8 okay for a Pentium?), 16 is recommended for K6 and 32 is ideal (too much waste). I think that true for any advanced processor because the caches works retrieving groups of 32 bytes (1 tag entry for 32 bytes). I saw that 16 was ok for a simple Cyrix 5x86 (486 family) because the internal bus is 128 bits wide. > unless [34]86 will be somehow punished by that. I think they will be punished because of the small cache. > Alternatively, we could change lib/specs to make GCC pass alignment > options to ld when -mpentium or such likes are use, but I don't see > any options to ld that can be used for that. Did I miss something? I don't know. Some time ago I solved the aligment problems in the following way: 1) I created a special section in the ld script aligned 512 bytes. 2) I marked all the critical functions with attribute section, forcing the routines to be placed in this section. 3) Compiled the modules with big aligments. In this way only the critical routines are "bloated" by the aligment. I got the same answer you copied when I faced this problem (COFF limitation). Another option is provide another copy of the libraries compiled with large aligments. Some weeks ago I timed some routines in my K6 using the Pentium instructions to meassure the clocks, I found the difference between well aligned and 4 bytes aligned routines (for small loops) is huge. > Btw, is somebody still working on porting Binutils 2.9? I have this link in my pages: A beta test release of binutils 2.9.1 by Andrew Crabtree can be found here or perhaps was moved here. So I think you'll get a better answer from Andrew ;-) SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013