[U-Boot-Users] Setting entry point in u-boot standalone apps
Martin Krause
Martin.Krause at tqs.de
Tue Sep 18 11:22:00 CEST 2007
Hi David,
u-boot-users-bounces at lists.sourceforge.net wrote on :
> I have a U-boot standalone app which runs on the Gumstix boards.
> It's based on the /u-boot-1.2.0/examples/ folder. The problem I have
> is that my entry
> function - lets call it app_entry() - isn't at the load address, it's
> somewhere in the middle. I'm using the output from objdump -d <elf
This is a known issue, please look at:
http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
> app no longer worked. After investigating I found that I needed to
> disassemble the file, locate where the entry function is now located,
> and do the following commands:
>
> loadb a0000000
> <send the .bin file>
> go a0000948 (or whatever the address of my entry function was)
>
> This then worked every time.
Yes, it should :-)
> The -e part should be specifying the entry point of the ELF file,
Yes, it specifies the entry point (= entry function) - but not at which
address the entry point is placed by the linker. So the entry option
does not, what you are looking for.
> Unfortunately, the examples don't use linker scripts, and I don't want
> to start messing with these as it interacts with u-boot to some extent
> (certainly built within u-boot's makefile), and it's all working as it
> is. From what I understand though, the -e option should be
> sufficient.
No, see comments above.
> Has anyone else experienced this problem, and can give any advice as
> to
> how to solve it?
You have to change your linker script. Tell the linker where it should
place your entry point function (I'm no linker expert, so I couldn't
give you advice at this ...)
Regards,
Martin Krause
--
TQ-Systems GmbH
Muehlstrasse 2, Gut Delling, D-82229 Seefeld
Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl
http://www.tq-group.com
More information about the U-Boot
mailing list