summaryrefslogtreecommitdiff
path: root/rt/start-openbsd.s
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-08-28 17:18:03 -0700
committerOri Bernstein <ori@eigenstate.org>2016-08-28 17:18:03 -0700
commitc33620540f35a1e64e0a60ee885520cfde9e8471 (patch)
tree3e989d28214d15e7f385caa3718f2682f28540d2 /rt/start-openbsd.s
parent9ac1c506c10ebe2a7ce8eb51e30c36c533565572 (diff)
downloadmc-c33620540f35a1e64e0a60ee885520cfde9e8471.tar.gz
Our ABI relies on zero %rbp to terminate the stack.
Let's zero it.
Diffstat (limited to 'rt/start-openbsd.s')
-rw-r--r--rt/start-openbsd.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/rt/start-openbsd.s b/rt/start-openbsd.s
index c1d3667..c278ab0 100644
--- a/rt/start-openbsd.s
+++ b/rt/start-openbsd.s
@@ -75,6 +75,7 @@ _start:
pushq %rsi
pushq %rdx
+ xorq %rbp,%rbp
/* call pre-main initializers */
call __init__
/* enter the main program */