When the u-boot address of destination equal to __start, no relocation. relocation offset(r9) = 0. Signed-off-by: Zhong Hongbo <bocui107@gmail.com> Tested-by: Stefano Babic <sbabic@denx.de>
@@ -190,6 +190,7 @@ stack_setup:
adr r0, _start
cmp r0, r6
+ moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
@@ -252,6 +252,7 @@ stack_setup:
@@ -210,6 +210,7 @@ stack_setup:
@@ -204,6 +204,7 @@ stack_setup:
@@ -236,6 +236,7 @@ stack_setup:
sub r9, r6, r0 /* r9 <- relocation offset */
mov r1, r6 /* r1 <- scratch for copy loop */
@@ -175,6 +175,7 @@ stack_setup:
@@ -171,6 +171,7 @@ stack_setup:
@@ -273,6 +273,7 @@ stack_setup:
@@ -184,6 +184,7 @@ stack_setup:
@@ -197,6 +197,7 @@ stack_setup:
@@ -156,6 +156,7 @@ stack_setup:
@@ -160,6 +160,7 @@ stack_setup: