diff options
author | bde <bde@FreeBSD.org> | 1999-12-27 10:42:55 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-12-27 10:42:55 +0000 |
commit | e449cadeebe209e353673443b2e57095d8910581 (patch) | |
tree | aed6e47c2205ca5b6d68b61f8d8e092bd3284fd7 /sys/kern/imgact_elf.c | |
parent | dc68d5537abe5fbecd1144ef0ff8ba033aeede78 (diff) | |
download | FreeBSD-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.c | 6 |
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); |