[coldfire-gnu-discuss] Problems with 5282evb
Nathan Sidwell
nathan at codesourcery.com
Wed Jan 17 18:06:25 UTC 2007
Tien Truong wrote:
> m68k-elf-gcc -mcpu=5282
> -T"C:\cvs_test\validation_suites\Benchmarks\eembc_1_1\to
> plevel\th\gnucoldfire\al\m5282evb-ram-hosted.ld" -g -o
> gnucoldfire/bin/ttsprk0
> 1.elf gnucoldfire/obj/ttsprk01/algotst.o
> gnucoldfire/obj/ttsprk01/bmark.o gnuco
> ldfire/obj/thobjs.a
> c:/program files/codesourcery/sourcery
> g++/bin/../lib/gcc/m68k-elf/4.1.1/../../.
> ./../m68k-elf/lib/m5208\libcf.a(cf-crt1.o): In function `__start1':
> cf-crt1.c:(.text+0xaa): undefined reference to `main'
> collect2: ld returned 1 exit status
> make: *** [gnucoldfire/bin/ttsprk01.elf] Error 1
This is expected behaviour of the coldfire toolchains (I won't go into the
details here). You can add '-u main' to your link line to resolve it. Here is
an example that shows the failure without -u and success with -u.
nathan at cugel:16>m68k-elf-gcc -c hello.c
nathan at cugel:19>m68k-elf-ar cr libhello.a hello.o
nathan at cugel:22>m68k-elf-gcc -T m5208evb-ram-hosted.ld -l hello
/scratch/nathan/cf-elf/install/bin/../lib/gcc/m68k-elf/4.1.1/../../../../m68k-elf/lib/libcf.a(cf-crt1.o):
In function `__start1':
/home/nathan/cf/src/newlib-20060320/libgloss/m68k/cf-crt1.c:57: undefined
reference to `main'
collect2: ld returned 1 exit status
nathan at cugel:23>m68k-elf-gcc -u main -T m5208evb-ram-hosted.ld -l hello
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan at codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the coldfire-gnu-discuss
mailing list