summaryrefslogtreecommitdiff
path: root/userspace/sys/crt0.S
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-21 15:37:45 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-21 15:37:45 +0100
commit65a859ac5b721c8d3e0123351ad99690e2e7a876 (patch)
treef47d53ecc9ff47451832f72fc306d20ea1bb1332 /userspace/sys/crt0.S
parent6e8ea08166b53507f38ed7f435728b7470a061ab (diff)
preparing switch to ELF userspace
Diffstat (limited to 'userspace/sys/crt0.S')
-rw-r--r--userspace/sys/crt0.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/userspace/sys/crt0.S b/userspace/sys/crt0.S
new file mode 100644
index 0000000..48eadd9
--- /dev/null
+++ b/userspace/sys/crt0.S
@@ -0,0 +1,23 @@
+.global _start
+
+.extern main
+.extern exit
+
+_start:
+
+push $0
+call sbrk
+
+#push $[_BSS_END_]
+#call sbrk
+
+call main
+
+
+push %eax
+call _exit
+
+# this should never be reached anyway!
+.wait:
+ hlt
+jmp .wait