Problems in the libs for powerpc-eabi

João Cadamuro Junior
Mon Jul 24 11:46:00 GMT 2000

Hi cross-gcc,

I saw this problem reported earlier in the list by other people, but I
cannot found a solution for it... Maybe someone knows what's wrong...

I have built my tools with target=powerpc-eabi and host cygwin 1.1.2 .
The tools were built without problems.

I have started my work using a Motorola's ADS board and the SDS monitor.
I think this board is supported in the basic aspects by newlib 1.8.2 .
But compiling the simple program:

int vector[100];
int main (void)
    int i;
    for ( i = 0; i < 100; i++ ) {
    return 0;

I found only problems...

Using the starup file crt0.o, library files libg.a and libads.a and the
linker script ads.ld supplied with newlib 1.8.2, I receive the following

powerpc-eabi-gcc -c -g -mcpu=860 -o teste.o teste.cpp
powerpc-eabi-ld -o teste.abs teste.o
/ppctools/powerpc-eabi/lib/nof/crt0.o \
-L/ppctools/powerpc-eabi/lib/nof -lg -lads -T ads.ld
teste.o: In function `main':
/cygdrive/d/cadamuro/teste/teste.cpp:5: undefined reference to `__eabi'
make: *** [teste.abs] Error 1

For me this was a good, unless the fact that '__eabi' is not defined in
the newlib libs (what's is realy true). '__eabi' is in the libgcc.a .
But, when I tried to include libgcc.a, I had much more problems...

powerpc-eabi-ld -o teste.abs teste.o
/ppctools/powerpc-eabi/lib/nof/crt0.o \
-L/ppctools/powerpc-eabi/lib/nof -lg -lads \
-L/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof -lgcc -T ads.ld
undefined reference to `__SDATA_START__'
undefined reference to `__SBSS_END__'
undefined reference to `__SDATA2_START__'
undefined reference to `__SBSS2_END__'
/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi-ctors.o): In
function `__do_global_ctors':
/tmp/build/gcc/gcc/eabi-ctors.c(.sdata+0x0): undefined reference to
/tmp/build/gcc/gcc/eabi-ctors.c(.sdata+0x4): undefined reference to
make: *** [teste.abs] Error 1

Someone has an idea about how to solve the problem???

Thanks in advance,


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list