summaryrefslogtreecommitdiff
path: root/src/user/lib/crt0.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/crt0.c')
-rw-r--r--src/user/lib/crt0.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/user/lib/crt0.c b/src/user/lib/crt0.c
new file mode 100644
index 0000000..91bbb05
--- /dev/null
+++ b/src/user/lib/crt0.c
@@ -0,0 +1,10 @@
+#include "elfload.h"
+#include <unistd.h>
+
+int main();
+
+__attribute__((__weak__))
+void _start(void) {
+ elf_selfreloc();
+ exit(main());
+}