diff mbox series

[v2,12/23] microblaze: Separate code end substraction

Message ID ca5cc3b4673b7d6d8de7c24392410c11af5c751e.1654589430.git.michal.simek@amd.com
State Superseded
Delegated to: Michal Simek
Headers show
Series microblaze: Add support for full relocation | expand

Commit Message

Michal Simek June 7, 2022, 8:10 a.m. UTC
Follow up patch will convert symbol handling that's why it is necessary to
separate logic around symbols to special instruction. It adds 4B for new
instruction but it is worth to do it to have code ready for for full
relocation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

(no changes since v1)

 arch/microblaze/cpu/start.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 205d5f384c38..a35d8d8ea29a 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -273,7 +273,8 @@  relocate_code:
 	add	r23, r0, r7 /* Move reloc addr to r23 */
 	/* Relocate text and data - r12 temp value */
 	addi	r21, r0, _start
-	addi	r22, r0, _end - 4 /* Include BSS too */
+	addi	r22, r0, _end /* Include BSS too */
+	addi	r22, r22, -4
 
 	rsub	r6, r21, r22
 	or	r5, r0, r0