From d42f99e6cf3b1027bcb73876cba9a605e7823fe0 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Tue, 9 Jun 2020 19:31:22 +0200 Subject: [PATCH] mescc: Mes C Library: Hang at the end if necessary. * lib/linux/arm-mes-mescc/crt1.c (_start): Hang at the end if necessary. --- lib/linux/arm-mes-mescc/crt1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/linux/arm-mes-mescc/crt1.c b/lib/linux/arm-mes-mescc/crt1.c index ffaca8ae..8b16d7bf 100644 --- a/lib/linux/arm-mes-mescc/crt1.c +++ b/lib/linux/arm-mes-mescc/crt1.c @@ -71,5 +71,7 @@ HOWEVER, the function entry already allocated space for locals on the stack (aft asm ("SYS_exit mov____$i8,%r7"); asm ("swi____$0"); - asm ("hlt"); + do { + asm ("wfi"); + } while (1); }