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]

Re: Still Problems in the libs for powerpc-eabi


On Mon, 24 Jul 2000, [iso-8859-1] Joćo Cadamuro Junior wrote:

> Date: Mon, 24 Jul 2000 17:00:12 -0300
> From: "[iso-8859-1] Joćo Cadamuro Junior" <cadamuro@lit.cpdtt.cefetpr.br>
> To: cross-gcc <crossgcc@sources.redhat.com>
> Subject: Still Problems in the libs for powerpc-eabi
> 
> 
> 
> Jay Kulpinski wrote:
> 
> > Joćo Cadamuro Junior wrote:
> > >
> > > 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++ ) {
> > >         vector[i]=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
> > > result:
> > >
> > > 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
> > >
> >
> > 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
> 
> Thank you Jay, but the problem is the same.
> 
> >
> >
> > > 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
> > > /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0x8):
> > > undefined reference to `__SDATA_START__'
> > > /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0xc):
> > > undefined reference to `__SBSS_END__'
> > > /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0x14):
> > > undefined reference to `__SDATA2_START__'
> > > /ppctools/lib/gcc-lib/powerpc-eabi/2.95.2/nof/libgcc.a(eabi.o)(.got2+0x18):
> > > 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
> > > `__init'
> > > /tmp/build/gcc/gcc/eabi-ctors.c(.sdata+0x4): undefined reference to
> > > `__fini'
> > > make: *** [teste.abs] Error 1
> > >
> > > Someone has an idea about how to solve the problem???
> > >
> > > Thanks in advance,
> > >

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).

> > > 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
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
> 

-- 
Hans Dulimarta, Ph.D.             dulimart@[egr.msu.edu, computer.org]
Visiting Research Associate         http://www.egr.msu.edu/%7edulimart   
                           Ph: (517)432-7589  Fax2Email: (760)281-7691
Elec. & Comp. Engg., Michigan State University, East Lansing, MI 48824


------
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]