[U-Boot] [RFC] arm926ejs: fix linker file for newer ld support

Darius Augulis augulis.darius at gmail.com
Sun Oct 31 19:35:45 CET 2010


Hi Albert,

On 10/31/2010 07:43 PM, Albert Aribaud wrote:
> This is an RFC so far. I'd like people who have issues with newer linkers to test this patch.
>
> It is intended for arm926ejs, so you might have to 'port' it to your own ARM architecture.

Thanks! It works on arm1176/mini6410 and solves problem of missing commands.

tested with gcc 4.4.5 + binutils 2.20.1 toolchain from Buildroot.

But it's strange, because I done the same test of declaring variable in 
start.s:

.globl cmd_start
cmd_start:
         .word __u_boot_cmd_start

Then disassembled elf shows it's value:

57e00048 <cmd_start>:
57e00048:       00000000        .word   0x00000000

Commands are there and somehow working, but at least it's very strange.

Darius.

>
> It has been roughly tested with ELDK 4.2 and CodeSourcery arm-2010q1-202; both seem to run rather properly (no NAND issue at startup, 'help' and commands seem to be there).
>
> Amicalement,
> Albert.
>
> Signed-off-by: Albert Aribaud<albert.aribaud at free.fr>
> ---
>   arch/arm/cpu/arm926ejs/u-boot.lds |   18 +++++++++---------
>   1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/u-boot.lds b/arch/arm/cpu/arm926ejs/u-boot.lds
> index 72f45f8..4e42543 100644
> --- a/arch/arm/cpu/arm926ejs/u-boot.lds
> +++ b/arch/arm/cpu/arm926ejs/u-boot.lds
> @@ -45,15 +45,6 @@ SECTIONS
>
>   	. = ALIGN(4);
>
> -	__rel_dyn_start = .;
> -	.rel.dyn : { *(.rel.dyn) }
> -	__rel_dyn_end = .;
> -
> -	__dynsym_start = .;
> -	.dynsym : { *(.dynsym) }
> -
> -	. = ALIGN(4);
> -
>   	. = .;
>   	__u_boot_cmd_start = .;
>   	.u_boot_cmd : { *(.u_boot_cmd) }
> @@ -64,6 +55,15 @@ SECTIONS
>   	.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
>   	_end = .;
>
> +	__rel_dyn_start = .;
> +	.rel.dyn : { *(.rel*) }
> +	__rel_dyn_end = .;
> +
> +	__dynsym_start = .;
> +	.dynsym : { *(.dynsym) }
> +
> +	. = ALIGN(4);
> +
>   	/DISCARD/ : { *(.dynstr*) }
>   	/DISCARD/ : { *(.dynamic*) }
>   	/DISCARD/ : { *(.plt*) }



More information about the U-Boot mailing list