From 28875e2c4731296ee7ed645d07f1c28c0301f1c4 Mon Sep 17 00:00:00 2001
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Date: Tue, 12 Feb 2013 22:22:13 +0100
Subject: MIPS: start.S: use symbol __image_copy_end for U-Boot image
 relocation

Use the newly introduced symbol __image_copy_end as end address for
relocation of U-Boot image. This is needed for dynamic relocation added
in later patches. This patch obsoletes the symbols uboot_end and
uboot_end_data which are removed.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
 arch/mips/cpu/mips64/start.S | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'arch/mips/cpu/mips64/start.S')

diff --git a/arch/mips/cpu/mips64/start.S b/arch/mips/cpu/mips64/start.S
index ba4ca4de38..5c2c7b5bad 100644
--- a/arch/mips/cpu/mips64/start.S
+++ b/arch/mips/cpu/mips64/start.S
@@ -165,7 +165,7 @@ relocate_code:
 	dsub	s1, s2, t0		# s1 <-- relocation offset
 
 	dla	t3, in_ram
-	ld	t2, -24(t3)		# t2 <-- uboot_end_data
+	ld	t2, -24(t3)		# t2 <-- __image_copy_end
 	move	t1, a2
 
 	dadd	gp, s1			# adjust gp
@@ -193,9 +193,8 @@ relocate_code:
 	jr	t0
 	 nop
 
+	.dword	__image_copy_end
 	.dword	_GLOBAL_OFFSET_TABLE_
-	.dword	uboot_end_data
-	.dword	uboot_end
 	.dword	num_got_entries
 
 in_ram:
@@ -206,7 +205,7 @@ in_ram:
 	 * generated by GNU ld. Skip these reserved entries from relocation.
 	 */
 	ld	t3, -8(t0)		# t3 <-- num_got_entries
-	ld	t8, -32(t0)		# t8 <-- _GLOBAL_OFFSET_TABLE_
+	ld	t8, -16(t0)		# t8 <-- _GLOBAL_OFFSET_TABLE_
 	dadd	t8, s1			# t8 now holds relocated _G_O_T_
 	daddi	t8, t8, 16		# skipping first two entries
 	dli	t2, 2
-- 
cgit v1.2.1