[U-Boot] [PATCH V2 1/3] arm926ejs: fix linker file for newer ld support

older ld emitted all ELF relocations in input sections named .rel.dyn, whereas newer ld uses names of the form .rel*. The linker script only collected .rel.dyn input sections. Rewrite to collect all .rel* input sections.
Signed-off-by: Albert Aribaud albert.aribaud@free.fr --- V1 Initial submission V2 arm926ejs: added ALIGN between bss and .rel.dyn sections tx25: removed GOT and datarel output sections tx25: fixed typo in config file commit message
arch/arm/cpu/arm926ejs/u-boot.lds | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/u-boot.lds b/arch/arm/cpu/arm926ejs/u-boot.lds index 72f45f8..ac6823a 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,14 @@ SECTIONS .bss (NOLOAD) : { *(.bss) . = ALIGN(4); } _end = .;
+ . = ALIGN(4); + __rel_dyn_start = .; + .rel.dyn : { *(.rel*) } + __rel_dyn_end = .; + + __dynsym_start = .; + .dynsym : { *(.dynsym) } + /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynamic*) } /DISCARD/ : { *(.plt*) }

older ld emitted all ELF relocations in input sections named .rel.dyn, whereas newer ld uses names of the form .rel*. The linker script only collected .rel.dyn input sections. Rewrite to collect all .rel* input sections.
Signed-off-by: Albert Aribaud albert.aribaud@free.fr --- nand_spl/board/karo/tx25/u-boot.lds | 27 +++++++++------------------ 1 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/nand_spl/board/karo/tx25/u-boot.lds b/nand_spl/board/karo/tx25/u-boot.lds index 5f95c87..c51db11 100644 --- a/nand_spl/board/karo/tx25/u-boot.lds +++ b/nand_spl/board/karo/tx25/u-boot.lds @@ -43,27 +43,9 @@ SECTIONS . = ALIGN(4); .data : { *(.data) - __datarel_start = .; - *(.data.rel) - __datarelrolocal_start = .; - *(.data.rel.ro.local) - __datarellocal_start = .; - *(.data.rel.local) - __datarelro_start = .; - *(.data.rel.ro) }
. = ALIGN(4); - __rel_dyn_start = .; - __rel_dyn_end = .; - __dynsym_start = .; - - __got_start = .; - . = ALIGN(4); - .got : { *(.got) } - - __got_end = .; - . = .; __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) } __u_boot_cmd_end = .; @@ -72,6 +54,15 @@ SECTIONS __bss_start = .; .bss : { *(.bss) } _end = .; + + . = ALIGN(4); + __rel_dyn_start = .; + .rel.dyn : { *(.rel*) } + __rel_dyn_end = .; + + __dynsym_start = .; + .dynsym : { *(.dynsym) } + /DISCARD/ : { *(.bss*) } /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynsym*) }

U-boot binary size increase made u-boot-spl copy only part of u-boot from NAND to RAM, missing part of the relocation data. Increase u-boot NAND size to match current build size plus a bit of slack.
Signed-off-by: Albert Aribaud albert.aribaud@free.fr --- include/configs/tx25.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/tx25.h b/include/configs/tx25.h index 8f8a1a3..6dcaf4c 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -39,7 +39,7 @@ #ifdef CONFIG_NAND_SPL /* Start copying real U-boot from the second page */ #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x800 -#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x30000 +#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x31000
#define CONFIG_SYS_NAND_U_BOOT_DST (0x81200000) #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
participants (1)
-
Albert Aribaud