diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1999-09-20 11:09:38 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1999-09-20 11:09:38 +0000 |
commit | bdb994f65b3c575b1cd1189b7c66f23f6bb4ec63 (patch) | |
tree | cf4389372c5358bcc1ee6fab44c205978f0334c9 /sys | |
parent | 4119dcec83a55d13f2ba08a99ea252f6d53405c7 (diff) |
clean up
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/exec_elf64.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/kern/exec_elf64.c b/sys/kern/exec_elf64.c index 9029c111512..a6573366e99 100644 --- a/sys/kern/exec_elf64.c +++ b/sys/kern/exec_elf64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf64.c,v 1.4 1999/09/19 16:16:49 kstailey Exp $ */ +/* $OpenBSD: exec_elf64.c,v 1.5 1999/09/20 11:09:37 kstailey Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -597,8 +597,8 @@ exec_elf64_makecmds(p, epp) goto bad; case PT_INTERP: + /* Already did this one */ case PT_NOTE: - /* Already did these */ case PT_DYNAMIC: break; @@ -689,7 +689,6 @@ exec_elf64_fixup(p, epp) struct elf_args *ap; AuxInfo ai[ELF_AUX_ENTRIES], *a; u_long pos = epp->ep_interp_pos; - size_t len; if(epp->ep_interp == 0) { return (0); @@ -716,13 +715,12 @@ exec_elf64_fixup(p, epp) } kill_vmcmds(&epp->ep_vmcmds); - a = ai; - /* * Push extra arguments on the stack needed by dynamically * linked binaries */ if (error == 0) { + a = ai; a->au_id = AUX_phdr; a->au_v = ap->arg_phaddr; @@ -751,14 +749,13 @@ exec_elf64_fixup(p, epp) a->au_id = AUX_entry; a->au_v = ap->arg_entry; a++; - } - a->au_id = AUX_null; - a->au_v = 0; - a++; + a->au_id = AUX_null; + a->au_v = 0; + a++; - len = (a - ai) * sizeof(AuxInfo); - error = copyout(ai, epp->ep_emul_argp, len); + error = copyout(ai, epp->ep_emul_argp, sizeof ai); + } free((char *)ap, M_TEMP); free((char *)interp, M_TEMP); return (error); |