summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_elf.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/kern/imgact_elf.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/kern/imgact_elf.c')
-rw-r--r--sys/kern/imgact_elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index c541147..45d33df 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -69,7 +69,7 @@ __ElfType(Brandinfo);
__ElfType(Auxargs);
static int elf_check_header __P((const Elf_Ehdr *hdr));
-static int elf_freebsd_fixup __P((long **stack_base,
+static int elf_freebsd_fixup __P((register_t **stack_base,
struct image_params *imgp));
static int elf_load_file __P((struct proc *p, const char *file, u_long *addr,
u_long *entry));
@@ -622,10 +622,10 @@ fail:
}
static int
-elf_freebsd_fixup(long **stack_base, struct image_params *imgp)
+elf_freebsd_fixup(register_t **stack_base, struct image_params *imgp)
{
Elf_Auxargs *args = (Elf_Auxargs *)imgp->auxargs;
- long *pos;
+ register_t *pos;
pos = *stack_base + (imgp->argc + imgp->envc + 2);
OpenPOWER on IntegriCloud