This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Fwd: Problems in the libs for powerpc-eabi (FINAL)]





> > > Try this for C++:
> > >       powerpc-eabi-g++ -g -mads -mcpu=860 -o teste.abs teste.cpp
> > >
> > > or this for C:
> > >       powerpc-eabi-gcc -g -mads -mcpu=860 -o teste.abs teste.c
> >
>
> Check the linker script that you are using (ads.ld) which is somewhere in
> <TopInstallationDir>/powerpc-eabi/lib/ads.ld.
> Those undefined symbols were defined in lowercase (look for PROVIDE lines
> in the linker script).

Thank you a lot. Both tips are very fine. Using the tips it was possible to understand
what's wrong.

If someone, like me, is trying to link a file for an embedded system like Motorola's
ADS860 "by hand", this is the way to do it:

powerpc-eabi-g++ -c -g -mcpu=860 teste.cpp
powerpc-eabi-ld -Bstatic -T /ppctools/powerpc-eabi/lib/nof/ads.ld -o teste.out \
/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/ecrti.o \
/ppctools/powerpc-eabi/lib/nof/crt0.o \
-L/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof \
-L/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2 \
-L/ppctools/powerpc-eabi/lib/nof \
-L/ppctools/powerpc-eabi/lib \
teste.o -lstdc++ -lm \
--start-group -lads -lc --end-group \
/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a \
/ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/ecrtn.o

This is what's done by the 'magic' option "-mads".

Cadamuro




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]