summaryrefslogtreecommitdiff
path: root/userspace/sys/crt0.S
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/sys/crt0.S')
-rw-r--r--userspace/sys/crt0.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/userspace/sys/crt0.S b/userspace/sys/crt0.S
index 33e5d32..025c21b 100644
--- a/userspace/sys/crt0.S
+++ b/userspace/sys/crt0.S
@@ -1,14 +1,15 @@
.global _start
-.extern main
-.extern exit
-
_start:
+pop %eax
+mov %eax, environ
+
call main
+push environ
push %eax
-call _exit
+call _exit2
# this should never be reached anyway!
.wait: