diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-11-01 19:37:51 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-11-01 19:37:51 +0000 |
commit | dc983ffde9e0c6887100dafe636dd52d1b975b31 (patch) | |
tree | 54afaedce5e647d6c6352e6decc4ed7cb78b130f /libexec | |
parent | 7495baf69cf99ddaa53f1727886afe64eb2ead92 (diff) |
Zero v0 before transferring control to the main program to indicate that
the main program should not reguster a cleanup handler with atexit(3).
This will allow us to add the cleanup handler registration code to crt0.c
and have ld.so pass its cleanup handler to the main program in the future.
While there, also zero ra to mark the last stack frame as demanded by the ELF
ABI.
ok kurt@, miod@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/mips64/ldasm.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S index 366fa09627b..4eff70f157f 100644 --- a/libexec/ld.so/mips64/ldasm.S +++ b/libexec/ld.so/mips64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.6 2010/03/27 20:45:09 kettenis Exp $ */ +/* $OpenBSD: ldasm.S,v 1.7 2012/11/01 19:37:50 kettenis Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -89,6 +89,8 @@ LEAF(_dl_start, FRAMESZ) /* Not really LEAF, but we simplify */ RESTORE_GP64 PTR_ADDU sp, FRAMESZ # Restore stack pointer. move t9, v0 # Entry address from _dl_boot. + move ra, zero # Mark last stack frame. + move v0, zero # cleanup j t9 # Go execute the 'real' program. END(_dl_start) |