summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-12-27 10:42:55 +0000
committerbde <bde@FreeBSD.org>1999-12-27 10:42:55 +0000
commite449cadeebe209e353673443b2e57095d8910581 (patch)
treeaed6e47c2205ca5b6d68b61f8d8e092bd3284fd7 /sys/alpha/linux/linux_sysvec.c
parentdc68d5537abe5fbecd1144ef0ff8ba033aeede78 (diff)
downloadFreeBSD-src-e449cadeebe209e353673443b2e57095d8910581.zip
FreeBSD-src-e449cadeebe209e353673443b2e57095d8910581.tar.gz
Changed the type used to represent the user stack pointer from `long *'
to `register_t *'. This fixes bugs like misplacement of argc and argv on the user stack on i386's with 64-bit longs. We still use longs to represent "words" like argc and argv, and assume that they are on the stack (and that there is stack). The suword() and fuword() families should also use register_t.
Diffstat (limited to 'sys/alpha/linux/linux_sysvec.c')
-rw-r--r--sys/alpha/linux/linux_sysvec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index 76be2b4..39f3000 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -66,9 +66,9 @@ extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
extern struct linker_set linux_ioctl_handler_set;
-static int linux_fixup __P((long **stack_base,
+static int linux_fixup __P((register_t **stack_base,
struct image_params *iparams));
-static int elf_linux_fixup __P((long **stack_base,
+static int elf_linux_fixup __P((register_t **stack_base,
struct image_params *iparams));
static void linux_prepsyscall __P((struct trapframe *tf, int *args,
u_int *code, caddr_t *params));
@@ -133,9 +133,9 @@ translate_traps(int signal, int trap_code)
}
static int
-linux_fixup(long **stack_base, struct image_params *imgp)
+linux_fixup(register_t **stack_base, struct image_params *imgp)
{
- long *argv, *envp;
+ register_t *argv, *envp;
argv = *stack_base;
envp = *stack_base + (imgp->argc + 1);
@@ -149,10 +149,10 @@ linux_fixup(long **stack_base, struct image_params *imgp)
}
static int
-elf_linux_fixup(long **stack_base, struct image_params *imgp)
+elf_linux_fixup(register_t **stack_base, struct image_params *imgp)
{
Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs;
- long *pos;
+ register_t *pos;
pos = *stack_base + (imgp->argc + imgp->envc + 2);
OpenPOWER on IntegriCloud