From 1062aed6d7f3f18b8b70c8aaad498ae11e33f534 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Mar 2023 20:28:41 +0200 Subject: [PATCH] Make sure the code won't continue after exit syscall --- libc/ElfInterpreter/ld.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/ElfInterpreter/ld.c b/libc/ElfInterpreter/ld.c index fcce1a8..3c84a46 100644 --- a/libc/ElfInterpreter/ld.c +++ b/libc/ElfInterpreter/ld.c @@ -367,6 +367,8 @@ void (*ELF_LAZY_RESOLVE_MAIN(struct LibAddressCollection *Info, long RelIndex))( PrintNL(" not found"); int ExitCode = 0x51801; syscall1(_Exit, ExitCode); + while (1) // Make sure we don't return + ; __builtin_unreachable(); }