[U-Boot] [ARM] gap between _start and CONFIG_SYS_TEXT_BASE

Sergey Mironov ierton at gmail.com
Tue Dec 21 16:43:08 CET 2010


Hi List.
I am working on porting U-Boot to arm1176-based SoC. It works in
general, but I had to cut off relocation because of a problem
described below. In short: Looks like u-boot fails to link correctly
with some CONFIG_SYS_TEXT_BASE values.

Board name: uemd
Compiler: arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2008q3-72)
4.3.2   -- I also tried a couple of other versions without difference.
Text_base: 0x00100010

I've checked that compiler really uses -Ttext 0x00100010 option while
building. But when I use nm to view actual address, I see:

u-boot-uemd % nm u-boot | grep -w _start
00100020 T _start

So there is 16-byte gap between TEXT_BASE and actual start of code.
Another way to see it is

u-boot-uemd % hexdump -Cv u-boot.bin | head -n 4
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  1a 00 00 ea 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |................|
00000020  14 f0 9f e5 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |................|
00000030  00 02 10 00 60 02 10 00  c0 02 10 00 20 03 10 00  |....`....... ...|

This binary will blow up either while relocating code or while first
call to malloc (probably due to invalid bss).

Does anybody knows what is going on? How can I tell the linker to
eliminate those gap?  Playing with . = ALIGN() in u-boot.lds didn't
help.

Sergey.


More information about the U-Boot mailing list