diff options
author | Ori Bernstein <ori@eigenstate.org> | 2016-08-28 17:18:03 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2016-08-28 17:18:03 -0700 |
commit | c33620540f35a1e64e0a60ee885520cfde9e8471 (patch) | |
tree | 3e989d28214d15e7f385caa3718f2682f28540d2 /rt | |
parent | 9ac1c506c10ebe2a7ce8eb51e30c36c533565572 (diff) | |
download | mc-c33620540f35a1e64e0a60ee885520cfde9e8471.tar.gz |
Our ABI relies on zero %rbp to terminate the stack.
Let's zero it.
Diffstat (limited to 'rt')
-rw-r--r-- | rt/_myrrt-plan9.s | 1 | ||||
-rw-r--r-- | rt/start-freebsd.s | 1 | ||||
-rw-r--r-- | rt/start-linux.s | 1 | ||||
-rw-r--r-- | rt/start-openbsd.s | 1 | ||||
-rw-r--r-- | rt/start-osx.s | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/rt/_myrrt-plan9.s b/rt/_myrrt-plan9.s index 4f21b9c..2f91f2f 100644 --- a/rt/_myrrt-plan9.s +++ b/rt/_myrrt-plan9.s @@ -57,6 +57,7 @@ TEXT _main(SB), 1, $(2*8+NPRIVATES*8) PUSHQ R13 PUSHQ DX + XORQ BP,BP CALL __init__(SB) CALL main(SB) POPQ DX diff --git a/rt/start-freebsd.s b/rt/start-freebsd.s index 54cd0ce..92f5435 100644 --- a/rt/start-freebsd.s +++ b/rt/start-freebsd.s @@ -53,6 +53,7 @@ _start: pushq %rsi pushq %rdx + xorq %rbp,%rbp /* call pre-main initializers */ call __init__ diff --git a/rt/start-linux.s b/rt/start-linux.s index 04c7029..8c72269 100644 --- a/rt/start-linux.s +++ b/rt/start-linux.s @@ -66,6 +66,7 @@ _start: pushq %rsi pushq %rdx + xorq %rbp,%rbp /* call pre-main initializers */ call __init__ /* enter the main program */ 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 */ diff --git a/rt/start-osx.s b/rt/start-osx.s index edf758a..3d7952f 100644 --- a/rt/start-osx.s +++ b/rt/start-osx.s @@ -54,6 +54,7 @@ start: pushq %rsi pushq %rdx + xorq %rbp,%rbp call ___init__ /* enter the main program */ call _main |