diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-06-01 19:55:21 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-06-01 19:55:21 +0000 |
commit | adf54e3250d29012230b97783366b8cfb5aded90 (patch) | |
tree | 68ea23adab4f66645cafc9e31469255693942d48 | |
parent | 5cd26918f30e84c5d9a1d61989d83b5c0fd830d1 (diff) |
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.S | 6 |
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) |