summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-10-22 21:15:00 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-10-22 21:15:00 +0000
commita645c714fcaf44ff6625e5bccac01fd9268a3e70 (patch)
tree461fa73bc96c59ec4e147592c801923e62e1d76a /libexec/ld.so
parentf3751d665c56b4637274b6a7098c49e70ff5100d (diff)
Zero %rdx before transferring control to the main program, to indicate that
the main program should not register 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. ok kurt@
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/amd64/ldasm.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/amd64/ldasm.S b/libexec/ld.so/amd64/ldasm.S
index 0ffe3a600eb..19fd5018fc9 100644
--- a/libexec/ld.so/amd64/ldasm.S
+++ b/libexec/ld.so/amd64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.8 2011/07/23 21:41:19 kettenis Exp $ */
+/* $OpenBSD: ldasm.S,v 1.9 2012/10/22 21:14:59 kettenis Exp $ */
/*
* Copyright (c) 2002,2004 Dale Rahn
@@ -64,8 +64,8 @@ _dl_start:
addq $DL_DATA_SIZE,%rsp # return dl_data
# popq %rbx # %rbx = ps_strings - XXXDSR
-# popq %rdx # %rdx = cleanup - XXXDSR
# popq %rcx # %rcx = obj_main - XXXDSR
+ movq $0, %rdx # %rdx = cleanup - XXXDSR
movq %r12, %rsp
jmp *%rax