[coldfire-gnu-discuss] GNU link error with code sourcery

Kazu Hirata kazu at codesourcery.com
Mon Jan 22 20:32:15 UTC 2007


Hi Vika,

>   CF2_CC := m68k-elf-gcc -m5200 -gstabs -I$(All my source code include 
> path)
>   $(All OBJS): %.o: ./path/%.c
>   $(CF2_CC) -c $(my header inclede paths) -Wa,-adhls=$*.ls -o $@ $<
>   
>   gnutest.obj: $(All OBJS) linkfile.ld
>   $(CF2_CC) -m5200 -Tlinkfile.ld -nostartfiles -o $@ $(All OBJS)
>   
>   
>   
>   makebuf.c:(.text+0xba): undefined reference to `isatty'
>   
> d:/cs/bin/../lib/gcc/m68k-elf/4.1.1/../../../../m68k-elf/lib\libc.a(sbrkr.o): 
> In function `_sbrk_r':
>   sbrkr.c:(.text+0x10): undefined reference to `sbrk'

Functions like sbrk, write, and fstat are in libcf.a.  You might want to 
check that linkfile.ld contains:

   GROUP(-lc -lunhosted -lcf)

See D:\CS\m68k-elf/lib/m5208/m5208evb-rom.ld for an example.

Regards,

Kazu Hirata




More information about the coldfire-gnu-discuss mailing list