[U-Boot] [PATCH 1/2] arm: implement ELF relocations

Heiko Schocher hs at denx.de
Wed Oct 6 07:37:37 CEST 2010


Hello albert,

Albert Aribaud wrote:
> ELF relocation tables generated with linker option -pie can
> be used to fixup code and data in a single loop at relocation,
> removing the need for manual fixups anywhere else in the code.
> 
> Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
> ---
>  arch/arm/config.mk                |   10 +-
>  arch/arm/cpu/arm926ejs/start.S    |  172 ++++++++++++++++-------------
>  arch/arm/cpu/arm926ejs/u-boot.lds |   14 +++
>  arch/arm/include/asm/u-boot-arm.h |   14 +-
>  arch/arm/lib/board.c              |    8 +-
>  doc/README.arm-relocation         |  222 +++++++------------------------------
>  6 files changed, 167 insertions(+), 273 deletions(-)
> 
[...]
> diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
> index a960689..f97f8ac 100644
> --- a/arch/arm/cpu/arm926ejs/start.S
> +++ b/arch/arm/cpu/arm926ejs/start.S
[...]
> @@ -153,29 +151,21 @@ FIQ_STACK_START:
>  IRQ_STACK_START_IN:
>  	.word	0x0badc0de
>  
> -.globl _datarel_start
> -_datarel_start:
> -	.word __datarel_start
> -
> -.globl _datarelrolocal_start
> -_datarelrolocal_start:
> -	.word __datarelrolocal_start
> -
> -.globl _datarellocal_start
> -_datarellocal_start:
> -	.word __datarellocal_start
> +.globl _datarel_start_ofs
> +_datarel_start_ofs:
> +	.word __datarel_start - _start
>  
> -.globl _datarelro_start
> -_datarelro_start:
> -	.word __datarelro_start
> +.globl _datarelrolocal_start_ofs
> +_datarelrolocal_start_ofs:
> +	.word __datarelrolocal_start - _start

We no longer need this __datarel* vars with your version
of relocation, please delete!

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list