From 5f2b1391747dfc7eea7e2a5c1f2400334e501797 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sat, 9 Sep 2017 00:42:10 -0400 Subject: [PATCH] Fixed crt0 issues which triggered crashes. --- crt0/switch_crt0.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crt0/switch_crt0.s b/crt0/switch_crt0.s index b8f04ac3..55b790d3 100644 --- a/crt0/switch_crt0.s +++ b/crt0/switch_crt0.s @@ -34,10 +34,9 @@ bss_loop: add x0, x0, x30 // relocate ptr got_loop: - ldr x2, [x0] - ldr x3, [x2] + ldr x3, [x0] add x3, x3, x30 - str x3, [x2] + str x3, [x0], #8 subs x1, x1, #8 bne got_loop @@ -45,6 +44,7 @@ got_loop: mov x1, #0 // argv ldr x3, =main + add x3, x3, x30 blr x3 _sysexit: