summaryrefslogtreecommitdiff
path: root/LibC
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-22 09:21:54 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-22 09:21:54 +0100
commit42342d2337a827f8d61ff2e6b47367f6a2cbd540 (patch)
tree30215c05b1f38f7c0458ac1644060cb391447656 /LibC
parent1da261eeb6491fcda461102f4ef16534c07bbfa1 (diff)
downloadserenity-42342d2337a827f8d61ff2e6b47367f6a2cbd540.zip
LibC: Tidy up _start a bit and rename compilation unit to "crt0"
Diffstat (limited to 'LibC')
-rw-r--r--LibC/Makefile2
-rw-r--r--LibC/crt0.cpp (renamed from LibC/entry.cpp)10
2 files changed, 5 insertions, 7 deletions
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
index 9446445d91..ab6a3ebfe2 100644
--- a/LibC/entry.cpp
+++ b/LibC/crt0.cpp
@@ -1,7 +1,6 @@
+#include <assert.h>
#include <stdio.h>
-#include <string.h>
-#include <Kernel/Syscall.h>
-#include <AK/StringImpl.h>
+#include <stdlib.h>
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);
}
}