[U-Boot-Users] *.lds for examples

Detlev Zundel dzu at denx.de
Fri Oct 8 02:12:44 CEST 2004


Hi Robin,

> I was trying to add an example, and was unable to get things to work
> properly. To start I tried just copying the hello_world.c to a
> smc91111_eeprom.c, and making what I thought were the correct entries
> in the examples/Makefile and top level Makefile (for make clean only).

Did you change the function name to smc9111_eeprom too?

> So, where is the entry point set?
>
> The actual make looked OK to me (sorry for the long lines):
> bfin-elf-gcc  -O0  -ffixed-P5 -D__KERNEL__ -DTEXT_BASE=0x20000000
> -I/home/rgetz/u-boot/u-boot_1.1.1/include -fno-built in -ffreestanding
> -nostdinc -isystem
> /home/rgetz/uClinux/toolchainoutput/lib/gcc-lib/bfin-elf/3.3.3/include
> -pipe  -D_
> _BLACKFIN__ -mno-underscore -DCONFIG_blackfin -D__blackfin__
> -I/home/rgetz/u-boot/u-boot_1.1.1 -Wall -Wstrict-prototyp es -c -o 
> hello_world.o hello_world.c bfin-elf-ld -g  -Ttext 0x1000 \
>          -o hello_world -e hello_world hello_world.o libstubs.a \
                          ^^^^^^^^^^^^^^
                               here
>          -L/home/rgetz/uClinux/toolchainoutput/lib/gcc-lib/bfin-elf/3.3.3
> -lgcc

The -e option (see info(ld)) is generated in the Makefile from the object
file name so probably the function in your object file was still
called 'hello_world'....

Cheers
  Detlev


-- 
Zivilisation ist der Zaubertrick, der uns unsere wahre Natur verbirgt.
                                            -- Salman Rushdie




More information about the U-Boot mailing list