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

Carlos O'Donell carlos at codesourcery.com
Mon Jan 22 20:38:02 UTC 2007


On Mon, Jan 22, 2007 at 12:03:08PM -0800, vika vika wrote:
>      gnutest.obj: $(All OBJS) linkfile.ld
>      $(CF2_CC) -m5200 -Tlinkfile.ld -nostartfiles -o $@ $(All OBJS)

You are using your own linker script "linkfile.ld" and not one of the
default scripts provided in Sourcery G++. We recommend you start with a
default script, and make the changes you need. 

You are using Coldfire ELF, which means there is no operating system
running on the CPU. Without an operating system you need to rely on the
host (Windows or Linux) to help print to the screen. When the host
(usually a debugger) helps your program we call this "semi-hosting."

If you are not going to use "printf" or don't need semi-hosting
functionality, then you can link in "-lunhosted" to resolve your missing
symbols. The default Sourcery G++ linker scripts show how to do this.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos at codesourcery.com
(650) 331-3385 x716



More information about the coldfire-gnu-discuss mailing list