diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-01-18 09:08:43 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-01-18 09:08:43 +0000 |
commit | 5d9a6f225ea47c9e0084b8aa8032ef1948ac07b7 (patch) | |
tree | 692dba7ff04b79a8c98a34778f16c7e5461f7eff /libexec/ld.so/mips64 | |
parent | 1513c71df19abd9a585cf06feda1b2feafda9545 (diff) |
Make ld.so pass its cleanup handler in $2 as required by the MIPS System V
ABI, and completely remove the code that attempts to call atexit(3) directly.
Diffstat (limited to 'libexec/ld.so/mips64')
-rw-r--r-- | libexec/ld.so/mips64/ldasm.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S index 2d7c19c28f5..7a73bc6a9c8 100644 --- a/libexec/ld.so/mips64/ldasm.S +++ b/libexec/ld.so/mips64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.8 2013/01/14 05:24:07 miod Exp $ */ +/* $OpenBSD: ldasm.S,v 1.9 2014/01/18 09:08:42 kettenis Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -66,11 +66,12 @@ LEAF(_dl_start, FRAMESZ) /* Not really LEAF, but we simplify */ move a2, s0 # Load offset jal _dl_boot # Go do the linking. + move t9, v0 # Entry address from _dl_boot. + LA v0, _dl_dtors # cleanup + 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) |