[U-Boot] [RFC] [PATCH] arm: arm926ejs: use ELF relocations

Albert ARIBAUD
2011-03-30T05:06:01Z

Hi,

(how is this an RFC or PATCH? There is none in this mail)

Le 30/03/2011 01:13, du zhigang a ?crit :
> dear:
>
> i am using u-boot 2011.03-rc1 compiled by CS arm-none-eabi-gcc 4.5.1
>
> board at91sam9263ek_norflash_boot_config i using gdb 6.8.1 debug it
>
> when u-boot compiledi found an error
>
> /dzg/crosstool/4.5.1/bin/.arm-none-eabi-ld: warning: creating a
> DT_TEXTREL in object.
>
> /dzg/x86/insight-6.8-1/gdb/insight -se u-boot
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 37
> >= 0 for section `'
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 32
> >= 0 for section `'
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 53
> >= 0 for section `'
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 1
> >= 0 for section `'
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 20
> >= 0 for section `'
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 82
> >= 0 for section `'
>
> BFD: /dzg/arm/u-boot/u-boot-2011.03-rc1/u-boot: invalid string offset 67
> >= 0 for section `'
>
> when i set breakpoint such as
>
> b board_init_f it seems to show wrong line number at line 132
>
> i also found this version of u-boot change board_init_f to run in flash
>
> why dose it? in version 2010.09 it run after relocated in ram
>
> i found the linker linkinit_fnc_t *init_sequence[]
>
> functions with address like 0x23fxxxxx

All this is the normal result of ARM relocation introduction, which I
sense you already know judging from the subject of your post.

> what does the linker do with -pie option does it link the functions run
> in flash with addr like 0xaxxxx?

Not exactly -- a toolchain has no notion of flash vs RAM. The -pie
option, as the binutil documentation states, produces a relocatable binary.

> do you test eldk 4.2 compiled with this board and run in norflash?

This is formally the board maintainer's work; see MAINTAINERS. However,
many other ARM boards are tested with ELDK 4.2 or CodeSourcery 2010q1
for instance.

Note that you can provide patches which the maintainer will just have to
Ack, as well.

> thanks
>
> best regards

Amicalement,
--
Albert.