summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-05-09 09:34:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-05-09 09:34:43 +0000
commitedd06fb34aa17dbf7404b20015ace1eb9fa1d515 (patch)
tree8960ff301b859a0d47bf9f713dffcecba1277ce6 /libexec
parent1cab1d150362bb86ebd653349769403194068828 (diff)
Reserve space for 6 extended word argument slots required by the ABI.
Apparently gcc4 uses them in cases where gcc3 didn't. Fixes segmentation faults with gcc4 because the space for the slots was colliding with the space for dl_data that we allocated on the stack. ok miod@
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/sparc64/ldasm.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S
index 7b9f8d72210..64d80185757 100644
--- a/libexec/ld.so/sparc64/ldasm.S
+++ b/libexec/ld.so/sparc64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.25 2010/04/24 18:12:29 kettenis Exp $ */
+/* $OpenBSD: ldasm.S,v 1.26 2010/05/09 09:34:42 kettenis Exp $ */
/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
/*
@@ -85,7 +85,7 @@
*/
/* Offset of ARGC from bottom of stack */
-#define ARGC (16*8)
+#define ARGC CC64FSZ
/* XXX - DL_DATA_SIZE should be (9*8), but I can't think right now. */
#define DL_DATA_SIZE (16*8)
@@ -96,7 +96,7 @@
_ENTRY(_dl_start)
sub %g0, %g0, %fp ! clear frame
mov %g1, %l1 ! save ps_strings
- sub %sp, DL_DATA_SIZE, %sp ! make room for dl_data
+ sub %sp, 48 + DL_DATA_SIZE, %sp ! make room for dl_data
add %sp, BIAS + ARGC, %l3
add %l3, DL_DATA_SIZE, %o0
@@ -131,7 +131,7 @@ _ENTRY(_dl_start)
call _dl_boot ! _dl_boot(argv,envp,loff,dl_data)
nop
- add %sp, DL_DATA_SIZE, %sp ! restore stack
+ add %sp, 48 + DL_DATA_SIZE, %sp ! restore stack
mov %l1, %g1 ! restore ps_strings
jmp %o0