From d7413ea37ebd849265575496ca35de0a0494a356 Mon Sep 17 00:00:00 2001 From: plutoo Date: Sun, 10 Sep 2017 23:22:49 +0200 Subject: [PATCH] Initialize heap from crt0 --- crt0/switch_crt0.s | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crt0/switch_crt0.s b/crt0/switch_crt0.s index 55b790d3..1d85fcc7 100644 --- a/crt0/switch_crt0.s +++ b/crt0/switch_crt0.s @@ -40,6 +40,15 @@ got_loop: subs x1, x1, #8 bne got_loop + + // setup heap + ldr x1, =HEAP_SIZE + svc 1 + ldr x1, =HEAP_SIZE + ldr x3, =heapInit + add x3, x3, x30 + blr x3 + mov x0, #0 // argc mov x1, #0 // argv