Skip to contentSkip to conversation

warning:cannot find entry symbol _start

U-Boot-Users Jhavk 2 participants 2 messages Nov 3, 2004

lore
Share & tools
lore

Jhavk

author
#0 lore raw

Hello, i want to make a standalone application which is separate from the address space of uboot.

Its a simple hello_world application.For this to run i needed the serial driver which i got from uboot/ cpu/arm920t/serial.c

For division i have got _udivsi3.S and div0.c files from uboot.

I call serial_init in my main.
I make hello_world.bin in a way similar to that in uboot.

The only diifernece is that i compile with nostdlib and static option.

This is my makefile :

CC = arm-linux-gcc

OBJCOPY = arm-linux-objcopy

CURDIR = /home/pigfire/serial

INCS = $(CURDIR)

CFLAGS = -Wall -static -nostdlib -I$(INCS)

DEPS = s3c2440.h speed.h

#########################################################################

All: hello_world hello_world.srec
hello_world.bin

all: $(ALL)

%.o: %.c $(DEPS)

                $(CC) -c -o $@ $< $(CFLAGS)

hello_world: hello_world.o _udivsi3.o div0.o

                $(CC) -o hello_world hello_world.o

_udivsi3.o div0.o $(CFLAGS) -I.

hello_world.srec:

                $(OBJCOPY) -O srec hello_world

hello_world.srec

hello_world.bin:

                $(OBJCOPY) -O binary hello_world

hello_world.bin 2>/dev/null

#########################################################################

clean:

                rm -f *.o hello_world *.a *.bin *.srec

But the problem is when i compile i get:

/usr/local/arm/2.95.3/arm-linux/bin/ld: warning:
cannot find entry symbol _start; defaulting to 00008074

And i get all three binaries.

But when i run hello_world.bin it hangs.

Why do i get this problem and why this problem does not occur in hello_world example of uboot?

Regards,
Jhavk

__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com

#1 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:

Hello, i want to make a standalone application which is separate from the address space of uboot.

Its a simple hello_world application.For this to run i needed the serial driver which i got from uboot/ cpu/arm920t/serial.c

This makes no sense. The serial driver is already included with the U-Boot running on your board, so you don't need it in your standalone application.

Quoted 1 line

I call serial_init in my main.

This makes no sense. The driver is already initialized and running in the U-Boot context. What are you trying to do?

Quoted 2 lines

I make hello_world.bin in a way similar to that in uboot.

I don't think so. The hello_world example does not perform any such funny stuff.

Quoted 2 lines

The only diifernece is that i compile with nostdlib and static option.

And you precise reasons for these options are?

Quoted 5 lines

But the problem is when i compile i get:

/usr/local/arm/2.95.3/arm-linux/bin/ld: warning:
cannot find entry symbol _start; defaulting to 00008074

Seems your linker options are not OK...

Quoted 2 lines

Why do i get this problem and why this problem does not occur in hello_world example of uboot?

You get these problems because you obviously did not understand how a standalone application works. But you don't provide enough informa- tion to come up with more detailed advice.

Best regards,

Wolfgang Denk

Signature · 3 lines
See us @ Embedded/Electronica Munich, Nov 09 - 12, Hall A.6 Booth 513
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C++ is the best example of second-system effect since OS/360.