aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/crt/crt0.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-04 00:11:57 +0200
committerMarvin Borner2021-04-04 00:11:57 +0200
commitacffb01f7a8474d4adf82049690380d63faba782 (patch)
treec593a6d7e4c71b793e3d806348f75ede663f36a1 /libs/libc/crt/crt0.c
parent7a64bdbbcf14023370b90b22de73c2f61a6f84ac (diff)
Added missing crt files
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