i386-elf/coff cross build
CARERI/SED
careri@public.sta.net.cn
Mon Apr 3 00:03:00 GMT 2000
I encountered the same problem as you when I built cross-gcc on cygwin for target i386-rtems.
And I tracked the source code and found out why the compiler generates ".align 3", not ".align 2^3" (that is ".align 8"):
The Makefile uses the file: .../gcc/config/i386/bsd.h, in which there is one line
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", (LOG))
And I think it doesn't fit the meaning of its comments above:
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
So I changed the line into
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
and rebuilt gcc.
The result was in expect.
Is this a bug?
Su Wenming
Engineer
CARERI
mailto:careri@public.sta.net.cn
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list