From 42342d2337a827f8d61ff2e6b47367f6a2cbd540 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 22 Feb 2019 09:21:54 +0100 Subject: [PATCH] LibC: Tidy up _start a bit and rename compilation unit to "crt0" --- LibC/Makefile | 2 +- LibC/{entry.cpp => crt0.cpp} | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) rename LibC/{entry.cpp => crt0.cpp} (71%) diff --git a/LibC/Makefile b/LibC/Makefile index 801437e4b5..d2ff62ae1a 100644 --- a/LibC/Makefile +++ b/LibC/Makefile @@ -45,7 +45,7 @@ LIBC_OBJS = \ sys/socket.o \ poll.o \ locale.o \ - entry.o + crt0.o ASM_OBJS = setjmp.no diff --git a/LibC/entry.cpp b/LibC/crt0.cpp similarity index 71% rename from LibC/entry.cpp rename to LibC/crt0.cpp index 9446445d91..ab6a3ebfe2 100644 --- a/LibC/entry.cpp +++ b/LibC/crt0.cpp @@ -1,7 +1,6 @@ +#include #include -#include -#include -#include +#include extern "C" { @@ -26,15 +25,14 @@ int _start(int argc, char** argv, char** env) fflush(stdout); fflush(stderr); - syscall(SC_exit, status); + exit(status); - // Birger's birthday <3 return 20150614; } [[noreturn]] void __cxa_pure_virtual() { - ASSERT_NOT_REACHED(); + assert(false); } }