summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-06-01 19:55:20 +0000
committermiod <miod@openbsd.org>2015-06-01 19:55:20 +0000
commit1f6e7696bf953b37f0fe038da6afbd4095159623 (patch)
tree39dacdcf6cf64dd1d218741e0b5ed22402f32d6d
parentRevert 1.2, which used to be necessary during the early ld 2.17 work, but (diff)
downloadwireguard-openbsd-1f6e7696bf953b37f0fe038da6afbd4095159623.tar.xz
wireguard-openbsd-1f6e7696bf953b37f0fe038da6afbd4095159623.zip
In the lazy binding routine, make sure we actually allocate the stack we need,
instead of corrupting the caller's stack by mistake. This fixes the mysterious segfaults in __powerpc_read_tcb() reported on earlier G3 systems - more recent processors have been luckier... ok deraadt@
-rw-r--r--libexec/ld.so/powerpc/ldasm.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/ld.so/powerpc/ldasm.S b/libexec/ld.so/powerpc/ldasm.S
index 478c1d92908..e8515cf94c0 100644
--- a/libexec/ld.so/powerpc/ldasm.S
+++ b/libexec/ld.so/powerpc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.21 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.22 2015/06/01 19:55:20 miod Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -126,7 +126,7 @@ ENTRY(_dl_start)
bctr # Go execute the 'real' program.
ENTRY(_dl_bind_start)
- stwu 1,-64(1)
+ stwu 1,-72(1)
stw 0,8(1) # save r0 - cerror ;-)
mflr 0
@@ -159,7 +159,7 @@ ENTRY(_dl_bind_start)
mtlr 0
lwz 0,8(1)
- addi 1,1,64
+ addi 1,1,72
bctr
#define DL_SYSCALL(n) DL_SYSCALL2(n,n)