summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-19 17:40:46 -0400
committerOri Bernstein <ori@eigenstate.org>2015-09-19 17:40:46 -0400
commit837b2cb7b258a5a81325e521b1555b18f88eab74 (patch)
treebaa484483d3dc9f531aec8cb9db75426d26ab354 /rt
parent54daa7961f3639adc9965ffa4ddf98e4ab0f2ff9 (diff)
downloadmc-837b2cb7b258a5a81325e521b1555b18f88eab74.tar.gz
Fix syscalls on FreeBSD
Diffstat (limited to 'rt')
-rw-r--r--rt/start-freebsd.s3
-rw-r--r--rt/start-linux.s2
2 files changed, 4 insertions, 1 deletions
diff --git a/rt/start-freebsd.s b/rt/start-freebsd.s
index 9f5dd2d..396674c 100644
--- a/rt/start-freebsd.s
+++ b/rt/start-freebsd.s
@@ -53,6 +53,9 @@ _start:
pushq %rsi
pushq %rdx
+ /* call pre-main initializers */
+ call __init__
+
/* enter the main program */
call main
/* exit(0) */
diff --git a/rt/start-linux.s b/rt/start-linux.s
index 963d21b..2164515 100644
--- a/rt/start-linux.s
+++ b/rt/start-linux.s
@@ -66,7 +66,7 @@ _start:
pushq %rsi
pushq %rdx
- /* enter the main program */
+ /* call pre-main initializers */
call __init__
/* enter the main program */
call main