summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib16/crt0.S7
-rw-r--r--lib16/crt0.c8
2 files changed, 8 insertions, 7 deletions
diff --git a/lib16/crt0.S b/lib16/crt0.S
deleted file mode 100644
index 447e002..0000000
--- a/lib16/crt0.S
+++ /dev/null
@@ -1,7 +0,0 @@
- .code16
- .section ".init","ax"
- .globl _start
-_start:
- jmp main
- .type _start,@function
- .size _start,.-_start
diff --git a/lib16/crt0.c b/lib16/crt0.c
new file mode 100644
index 0000000..acc21c3
--- /dev/null
+++ b/lib16/crt0.c
@@ -0,0 +1,8 @@
+#include <sys16.h>
+
+extern int main(int, char **);
+
+int __attribute__((section(".init"))) _start(void)
+{
+ return main(SYS->argc, SYS->argv);
+}