summaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-07-31 07:33:23 +1200
committerSimon Glass <sjg@chromium.org>2011-09-14 21:55:43 -0700
commitf23e5f319d6bcdd869571ddd96e01ec780806648 (patch)
tree5d952c552797d830c25516962fd84bc6887fbd1f /arch/arm/cpu
parent45943ddd690d6d5cc6778647543fd4efac89e7ab (diff)
postload: Add new _reloc_end to define end of relocated area
Rather than __bss_end, define a new symbol which sets the end boundary of code to be relocated by relocate_code(). This allows us to add code after the BSS section which is still relocatable. BUG=chromium-os:17053 TEST=build and boot U-Boot on seaboard Change-Id: Ice784ee65ab8cbb7d2b996dc53c722c5dd9315c0 Reviewed-on: http://gerrit.chromium.org/gerrit/7660 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/armv7/start.S4
-rw-r--r--arch/arm/cpu/armv7/u-boot.lds3
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index eafd7ee84d..644337ebf6 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -81,6 +81,10 @@ _bss_start_ofs:
_bss_end_ofs:
.word __bss_end__ - _start
+.globl _reloc_end_ofs
+_reloc_end_ofs:
+ .word __reloc_end__ - _start
+
.globl _end_ofs
_end_ofs:
.word _end - _start
diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
index dbae54d4f8..6c06ccb460 100644
--- a/arch/arm/cpu/armv7/u-boot.lds
+++ b/arch/arm/cpu/armv7/u-boot.lds
@@ -75,6 +75,9 @@ SECTIONS
__bss_end__ = .;
}
+ /* We must relocate everything from the start to here */
+ __reloc_end__ = .;
+
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynamic*) }
/DISCARD/ : { *(.plt*) }