Problem in using powerpc-eabi cross linker...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Again the doubt is on powerpc-eabi cross toolchain with newlib.

Although I built the tool chain, I'm facing problem in using the cross built
tools.

I wrote a simple hello world test program and compiled.
The following errors are issued from linker:

powerpc-eabi-ld: warning: cannot find entry symbol _start; defaulting to
01800074
libgcc.a(eabi.o): In function `__eabi':
eabi.S:232: undefined reference to `__init'
libgcc.a(eabi.o):(.got2+0x8): undefined reference to `__SDATA_START__'
libgcc.a(eabi.o):(.got2+0xc): undefined reference to `__SBSS_END__'
libgcc.a(eabi.o):(.got2+0x14): undefined  reference to `__SDATA2_START__'
...
...
libgcc.a(eabi.o):(.got2+0x50): undefined reference to `__EXCEPT_END__'
collect2: ld returned 1 exit status

If I add -msim or -mads, it is compiled and linked succesfully.

I understand that -msim should be added only if my application is going to
run on any simulator, not on real 

hardware. Here startup module sim-crt0.o is called and the standard C
libraries are ‘libsim.a’ and ‘libc.a’.

I'm not able to understand what '-mads' is for. Could any one please beief
this?

Moreover, when I invoked the compiler and linker separately, linker issues
error.

powerpc-eabi-gcc -c test.c -> test.o is generated.

I tried the following variant options for linker.

powerpc-eabi-ld test.o
powerpc-eabi-ld /path_to_startup/crt0.o test.o -lc

All resulted in error as above.

what are all the extra options I should supply to linker? Or is it the
problem in building of my tool chain?
Can't the linker automatically look for standard libraries like libc.a,
libm.c and the startup module crt0.o?

I used --target=powerpc-eabi to build my tool chain. Should I use specific
target like powerpc-eabisim (for 
simulator)?

My target is an embedded PowerPC processor with non-linux OS running in
big-endian mode.

It will be a great help if I you give solution for this.

Thanks a lot.
Jeffi

-- 
View this message in context: http://www.nabble.com/Problem-in-using-powerpc-eabi-cross-linker...-tp26047249p26047249.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux