summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7
diff options
context:
space:
mode:
authorAlbert Aribaud <albert.aribaud@free.fr>2010-11-15 21:46:03 +0100
committerWolfgang Denk <wd@denx.de>2010-11-17 20:44:32 +0100
commitaaeb0a890a050b58be87fa2b165eec5fa947dc86 (patch)
tree45343feeeb9ec610bac21a14d9c55e98e77b02cb /arch/arm/cpu/armv7
parent227b72515546fca535dbd3274f6d875d97f494fe (diff)
ARM: 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>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r--arch/arm/cpu/armv7/start.S24
-rw-r--r--arch/arm/cpu/armv7/u-boot.lds46
2 files changed, 25 insertions, 45 deletions
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index bb3948d401..2dfdafe982 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -98,30 +98,6 @@ FIQ_STACK_START:
IRQ_STACK_START_IN:
.word 0x0badc0de
-.globl _datarel_start_ofs
-_datarel_start_ofs:
- .word __datarel_start - _start
-
-.globl _datarelrolocal_start_ofs
-_datarelrolocal_start_ofs:
- .word __datarelrolocal_start - _start
-
-.globl _datarellocal_start_ofs
-_datarellocal_start_ofs:
- .word __datarellocal_start - _start
-
-.globl _datarelro_start_ofs
-_datarelro_start_ofs:
- .word __datarelro_start - _start
-
-.globl _got_start_ofs
-_got_start_ofs:
- .word __got_start - _start
-
-.globl _got_end_Ofs
-_got_end_ofs:
- .word __got_end - _start
-
/*
* the actual reset code
*/
diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
index 88a0fecd86..5725c30c69 100644
--- a/arch/arm/cpu/armv7/u-boot.lds
+++ b/arch/arm/cpu/armv7/u-boot.lds
@@ -44,34 +44,38 @@ 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 : { *(.rel.dyn) }
- __rel_dyn_end = .;
-
- __dynsym_start = .;
- .dynsym : { *(.dynsym) }
- __got_start = .;
. = ALIGN(4);
- .got : { *(.got) }
- __got_end = .;
+ . = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
- __bss_start = .;
- .bss : { *(.bss) }
- _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*) }
+ /DISCARD/ : { *(.plt*) }
+ /DISCARD/ : { *(.interp*) }
+ /DISCARD/ : { *(.gnu*) }
}