egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"

Oliver M. Kellogg Oliver.Kellogg@vs.dasa.de
Thu Jan 21 06:34:00 GMT 1999


Jeffrey A Law <law@cygnus.com> wrote:

> There's a mismatch between the compiler and the assembler.
> 
> The compiler expects the assembler to interpret the alignment value as 2**N;
> the assembler is interpreting the alignment value as just N.  It is possible
> lynx systems in the past used to interpret the value as N and gas is trying
> to be compatible.  I don't really know.

Thanks. I found a symbol in gcc/auto-host.h, HAVE_GAS_BALIGN_AND_P2ALIGN 
which the configure had undefined. However, I verified that the AS of my 
LynxOS 2.5 target DOES support those statements. Apparently, the config 
is for an older LynxOS version where these were not yet supported (?)
After defining the HAVE_GAS_BALIGN_AND_P2ALIGN, I am no longer getting 
the "power of 2" error.

I am now a bit farther, but stumbling on libgcc1-test:

./xgcc -B./ -DCROSS_COMPILE -DIN_GCC    -g -I./include     -c ./libgcc1-test.c
./libgcc1-test.c:101: warning: conflicting types for built-in function `memcpy'
Testing libgcc1.  Ignore linker warning messages.
./xgcc -B./ -DCROSS_COMPILE -DIN_GCC    -g -I./include  libgcc1-test.o -o libgcc1-test \
  -nostartfiles -nostdlib `./xgcc -B./ --print-libgcc-file-name`
/var/kelloggs_extra_space/i586-lynxos2.5/bin/ld: warning: cannot find entry symbol _main; defaulting to 000000f8
libgcc1-test.o: In function `mainCRTStartup':
/var/kelloggs_extra_space/egcs-1.1.1/gcc/./libgcc1-test.c(.stab+0x14): undefined reference to `Ltext0'
/var/kelloggs_extra_space/egcs-1.1.1/gcc/./libgcc1-test.c(.stab+0x20): undefined reference to `Ltext0'
collect2: ld returned 1 exit status

Here is the beginning of libgcc1-test.s:

        .file   "libgcc1-test.c"
gcc2_compiled.:
__gnu_compiled_c:
.stabs "/var/kelloggs_extra_space/egcs-1.1.1/gcc/",100,0,0,Ltext0
.stabs "libgcc1-test.c",100,0,0,Ltext0
.text 
.Ltext0:
.stabs "int:t1=r1;0020000000000;0017777777777;",128,0,0,0
.stabs "char:t2=r2;0;127;",128,0,0,0

I can assemble this file without error on the actual LynxOS-2.5 target;
this must be a config problem (probably again LynxOS version related) with 
the i586-lynxos-gas cross assembler.

> "binutils-1.9.1"?  Typo maybe?  2.9.1 instead?

Right, thanks. binutils-2.9.1

-- Oliver




More information about the Gcc-bugs mailing list