aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/crt/crt0.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libc/crt/crt0.c')
-rw-r--r--libs/libc/crt/crt0.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/libc/crt/crt0.c b/libs/libc/crt/crt0.c
new file mode 100644
index 0000000..6c38474
--- /dev/null
+++ b/libs/libc/crt/crt0.c
@@ -0,0 +1,18 @@
+// MIT License, Copyright (c) 2021 Marvin Borner
+
+#include <def.h>
+#include <sys.h>
+
+#ifdef USER
+
+extern int main(int, char **);
+
+void _start(void);
+void _start(void)
+{
+ exit(main(0, NULL));
+ while (1)
+ ;
+}
+
+#endif