[U-Boot-Users] [PATCH] linker script for building hello_world.c on arm

Lars Munch lars at segv.dk
Fri Sep 3 14:18:00 CEST 2004


On Thu, Sep 02, 2004 at 07:39:29PM +0200, Wolfgang Denk wrote:
> In message <20040902120609.GA2948 at tuxedo.skovlyporten.dk> you wrote:
> > 
> > I was unable to build the hello_world.c example for my arm target
> > without adding a linker script. The attached patch fixes this.
> 
> Why do you need such a script, when all the existing ARM  (and  MIPS,
> and PowerPC, and ...) systems don't need one?

The mips and nios systems uses a linker script for building hello_world,
so I thought this was a common problem.

This is the linker error I get when building examples using 91rm9200dk_config:

arm-linux-gcc -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8
-D__KERNEL__ -DTEXT_BASE=0x21f80000 -I/home/lmc/u-boot-orig/include
-fno-builtin -ffreestanding -nostdinc -isystem
/opt/arm-linux/lib/gcc/arm-linux/3.4.1/include -pipe  -DCONFIG_ARM
-D__ARM__ -mapcs-32 -march=armv4 -mtune=arm7tdmi -Wall
-Wstrict-prototypes -g  -Os   -fno-strict-aliasing  -fno-common
-ffixed-r8  -D__KERNEL__ -DTEXT_BASE=0x21f80000
-I/home/lmc/u-boot-orig/include -fno-builtin -ffreestanding -nostdinc
-isystem /opt/arm-linux/lib/gcc/arm-linux/3.4.1/include -pipe
-DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=arm7tdmi -I..
-Bstatic -T /home/lmc/u-boot-orig/board/at91rm9200dk/u-boot.lds -Ttext
0x21f80000   hello_world.c   -o hello_world
/opt/arm-linux/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [hello_world] Error 1
make[1]: Leaving directory `/home/lmc/u-boot-orig/examples'
make: *** [examples] Error 2

I am using binutils-2.15 and gcc-3.4.1. I have builded gcc with:

../gcc-3.4.1/configure --target=arm-linux --with-gnu-as \
 --with-gnu-ld --enable-languages="c" --verbose \
 --disable-threads --without-headers --disable-shared --disable-nls

Am I missing something?

Best regards
Lars Munch





More information about the U-Boot mailing list