[U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support
Albert Aribaud
albert.aribaud at free.fr
Thu Nov 4 23:22:11 CET 2010
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 and overlay with .bss.
Signed-off-by: Albert Aribaud <albert.aribaud at 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
V3 arm926ejs: overlaid .bss and .rel.dyn sections
tx25: overlaid .bss and .rel.dyn sections
V4 arm926ejs and tx25: fixed overlay
tx25: removed third patch as u-boot size remains small enough
arch/arm/cpu/arm926ejs/u-boot.lds | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/u-boot.lds b/arch/arm/cpu/arm926ejs/u-boot.lds
index 72f45f8..28c91f9 100644
--- a/arch/arm/cpu/arm926ejs/u-boot.lds
+++ b/arch/arm/cpu/arm926ejs/u-boot.lds
@@ -45,24 +45,30 @@ 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) }
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
- _end = .;
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
+ _end = .;
+ }
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynamic*) }
--
1.7.1
More information about the U-Boot
mailing list