Module Name: src
Committed By: matt
Date: Fri Feb 3 20:11:55 UTC 2012
Modified Files:
src/sys/compat/linux/arch/amd64: linux_exec_machdep.c
src/sys/compat/linux/arch/powerpc: linux_exec_powerpc.c
src/sys/compat/linux/common: linux_exec_elf32.c
src/sys/compat/linux32/common: linux32_exec_elf32.c
src/sys/compat/netbsd32: netbsd32_exec_elf32.c
src/sys/compat/osf1: osf1_exec_ecoff.c
src/sys/compat/svr4_32: svr4_32_exec_elf32.c
src/sys/kern: exec_elf.c kern_exec.c
src/sys/sys: exec.h
Log Message:
Add a hook for freeing an ep_emul_arg. Add a wrapper routine
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg
and ep_emul_arg_free members in the exec_package.
Change users/accessors to use these routines.
Approved by releng.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/sys/compat/linux/arch/amd64/linux_exec_machdep.c
cvs rdiff -u -r1.22 -r1.23 \
src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/common/linux_exec_elf32.c
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_exec_elf32.c
cvs rdiff -u -r1.34 -r1.35 src/sys/compat/netbsd32/netbsd32_exec_elf32.c
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/osf1/osf1_exec_ecoff.c
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/svr4_32/svr4_32_exec_elf32.c
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/exec_elf.c
cvs rdiff -u -r1.335 -r1.336 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.133 -r1.134 src/sys/sys/exec.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/linux/arch/amd64/linux_exec_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.18 src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.19
--- src/sys/compat/linux/arch/amd64/linux_exec_machdep.c:1.18 Wed Jul 7 01:30:33 2010
+++ src/sys/compat/linux/arch/amd64/linux_exec_machdep.c Fri Feb 3 20:11:53 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_machdep.c,v 1.18 2010/07/07 01:30:33 chs Exp $ */
+/* $NetBSD: linux_exec_machdep.c,v 1.19 2012/02/03 20:11:53 matt Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.18 2010/07/07 01:30:33 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.19 2012/02/03 20:11:53 matt Exp $");
#define ELFSIZE 64
@@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_m
#include <sys/resource.h>
#include <sys/proc.h>
#include <sys/conf.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
#include <sys/exec_elf.h>
#include <sys/vnode.h>
#include <sys/lwp.h>
@@ -154,7 +154,7 @@ ELFNAME2(linux,copyargs)(struct lwp *l,
*/
if (ap == NULL) {
phsize = eh->e_phnum * sizeof(Elf_Phdr);
- ph = (Elf_Phdr *)malloc(phsize, M_TEMP, M_WAITOK);
+ ph = (Elf_Phdr *)kmem_alloc(phsize, KM_SLEEP);
error = exec_read_from(l, pack->ep_vp, eh->e_phoff, ph, phsize);
if (error != 0) {
for (i = 0; i < eh->e_phnum; i++) {
@@ -164,7 +164,7 @@ ELFNAME2(linux,copyargs)(struct lwp *l,
}
}
}
- free(ph, M_TEMP);
+ kmem_free(ph, phsize);
}
@@ -235,11 +235,8 @@ ELFNAME2(linux,copyargs)(struct lwp *l,
strcpy(esd.hw_platform, LINUX_PLATFORM);
- if (ap) {
- free((char *)ap, M_TEMP);
- pack->ep_emul_arg = NULL;
- }
-
+ exec_free_emul_arg(pack);
+
/*
* Copy out the ELF auxiliary table and hw platform name
*/
Index: src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c
diff -u src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c:1.22 src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c:1.23
--- src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c:1.22 Wed Jul 7 01:30:34 2010
+++ src/sys/compat/linux/arch/powerpc/linux_exec_powerpc.c Fri Feb 3 20:11:53 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_powerpc.c,v 1.22 2010/07/07 01:30:34 chs Exp $ */
+/* $NetBSD: linux_exec_powerpc.c,v 1.23 2012/02/03 20:11:53 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -41,14 +41,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_powerpc.c,v 1.22 2010/07/07 01:30:34 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_powerpc.c,v 1.23 2012/02/03 20:11:53 matt Exp $");
#define ELFSIZE 32
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
-#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/exec.h>
#include <sys/exec_elf.h>
@@ -166,8 +165,7 @@ ELFNAME2(linux,copyargs)(l, pack, arginf
a->a_v = LINUX_ELF_HWCAP;
a++;
- free((char *)ap, M_TEMP);
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
a->a_type = AT_NULL;
Index: src/sys/compat/linux/common/linux_exec_elf32.c
diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.84 src/sys/compat/linux/common/linux_exec_elf32.c:1.85
--- src/sys/compat/linux/common/linux_exec_elf32.c:1.84 Sat Sep 11 20:49:28 2010
+++ src/sys/compat/linux/common/linux_exec_elf32.c Fri Feb 3 20:11:53 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_elf32.c,v 1.84 2010/09/11 20:49:28 chs Exp $ */
+/* $NetBSD: linux_exec_elf32.c,v 1.85 2012/02/03 20:11:53 matt Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.84 2010/09/11 20:49:28 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.85 2012/02/03 20:11:53 matt Exp $");
#ifndef ELFSIZE
/* XXX should die */
@@ -442,8 +442,7 @@ ELFNAME2(linux,copyargs)(struct lwp *l,
a->a_v = ap->arg_entry;
a++;
- free(pack->ep_emul_arg, M_TEMP);
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
/* Linux-specific items */
Index: src/sys/compat/linux32/common/linux32_exec_elf32.c
diff -u src/sys/compat/linux32/common/linux32_exec_elf32.c:1.12 src/sys/compat/linux32/common/linux32_exec_elf32.c:1.13
--- src/sys/compat/linux32/common/linux32_exec_elf32.c:1.12 Sat Sep 11 20:49:28 2010
+++ src/sys/compat/linux32/common/linux32_exec_elf32.c Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_exec_elf32.c,v 1.12 2010/09/11 20:49:28 chs Exp $ */
+/* $NetBSD: linux32_exec_elf32.c,v 1.13 2012/02/03 20:11:54 matt Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2001,2006 The NetBSD Foundation, Inc.
@@ -31,14 +31,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.12 2010/09/11 20:49:28 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.13 2012/02/03 20:11:54 matt Exp $");
#define ELFSIZE 32
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/malloc.h>
#include <sys/vnode.h>
#include <sys/exec.h>
#include <sys/exec_elf.h>
@@ -153,8 +152,7 @@ linux32_elf32_copyargs(struct lwp *l, st
a->a_v = ap->arg_entry;
a++;
- free(ap, M_TEMP);
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
/* Linux-specific items */
Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.34 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.35
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.34 Fri Feb 3 03:54:35 2012
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_exec_elf32.c,v 1.34 2012/02/03 03:54:35 christos Exp $ */
+/* $NetBSD: netbsd32_exec_elf32.c,v 1.35 2012/02/03 20:11:54 matt Exp $ */
/* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
/*
@@ -57,14 +57,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.34 2012/02/03 03:54:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.35 2012/02/03 20:11:54 matt Exp $");
#define ELFSIZE 32
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/malloc.h>
#include <sys/vnode.h>
#include <sys/exec.h>
#include <sys/exec_elf.h>
@@ -196,8 +195,7 @@ netbsd32_elf32_copyargs(struct lwp *l, s
a->a_v = kauth_cred_getgid(l->l_cred);
a++;
- kmem_free(ap, sizeof(*ap));
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
a->a_type = AT_NULL;
Index: src/sys/compat/osf1/osf1_exec_ecoff.c
diff -u src/sys/compat/osf1/osf1_exec_ecoff.c:1.23 src/sys/compat/osf1/osf1_exec_ecoff.c:1.24
--- src/sys/compat/osf1/osf1_exec_ecoff.c:1.23 Thu Jun 24 13:03:07 2010
+++ src/sys/compat/osf1/osf1_exec_ecoff.c Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_exec_ecoff.c,v 1.23 2010/06/24 13:03:07 hannken Exp $ */
+/* $NetBSD: osf1_exec_ecoff.c,v 1.24 2012/02/03 20:11:54 matt Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -31,12 +31,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_exec_ecoff.c,v 1.23 2010/06/24 13:03:07 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_exec_ecoff.c,v 1.24 2012/02/03 20:11:54 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/exec.h>
@@ -56,6 +56,7 @@ struct osf1_exec_emul_arg {
};
static int osf1_exec_ecoff_dynamic(struct lwp *l, struct exec_package *epp);
+static void osf1_free_emul_arg(void *);
int
osf1_exec_ecoff_probe(struct lwp *l, struct exec_package *epp)
@@ -69,8 +70,9 @@ osf1_exec_ecoff_probe(struct lwp *l, str
return ENOEXEC;
/* set up the exec package emul arg as appropriate */
- emul_arg = malloc(sizeof *emul_arg, M_TEMP, M_WAITOK);
+ emul_arg = kmem_alloc(sizeof(*emul_arg), KM_SLEEP);
epp->ep_emul_arg = emul_arg;
+ epp->ep_emul_arg_free = osf1_free_emul_arg;
emul_arg->flags = 0;
/* this cannot overflow because both are size PATH_MAX */
@@ -97,8 +99,7 @@ osf1_exec_ecoff_probe(struct lwp *l, str
}
if (error) {
- free(epp->ep_emul_arg, M_TEMP);
- epp->ep_emul_arg = NULL;
+ exec_free_emul_arg(epp);
kill_vmcmds(&epp->ep_vmcmds); /* if any */
}
@@ -166,8 +167,7 @@ osf1_copyargs(struct lwp *l, struct exec
*stackp += len;
out:
- free(pack->ep_emul_arg, M_TEMP);
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
return error;
}
@@ -294,3 +294,12 @@ bad:
vrele(ldr_vp);
return (error);
}
+
+void
+osf1_free_emul_arg(void *arg)
+{
+ struct osf1_exec_emul_arg *emul_arg = arg;
+ KASSERT(emul_arg != NULL);
+
+ kmem_free(emul_arg, sizeof(*emul_arg));
+}
Index: src/sys/compat/svr4_32/svr4_32_exec_elf32.c
diff -u src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.21 src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.22
--- src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.21 Sun May 2 05:30:20 2010
+++ src/sys/compat/svr4_32/svr4_32_exec_elf32.c Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_32_exec_elf32.c,v 1.21 2010/05/02 05:30:20 dholland Exp $ */
+/* $NetBSD: svr4_32_exec_elf32.c,v 1.22 2012/02/03 20:11:54 matt Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.21 2010/05/02 05:30:20 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.22 2012/02/03 20:11:54 matt Exp $");
#define ELFSIZE 32 /* XXX should die */
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_32_exec
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
-#include <sys/malloc.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/exec_elf.h>
@@ -149,8 +148,7 @@ svr4_32_copyargs(struct lwp *l, struct e
a++;
}
- free((char *)ap, M_TEMP);
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
a->a_type = AT_NULL;
@@ -238,8 +236,7 @@ svr4_32_copyargs(struct lwp *l, struct e
a++;
}
- free((char *)ap, M_TEMP);
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
a->a_type = AT_NULL;
Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.34 src/sys/kern/exec_elf.c:1.35
--- src/sys/kern/exec_elf.c:1.34 Wed Feb 1 21:49:52 2012
+++ src/sys/kern/exec_elf.c Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.34 2012/02/01 21:49:52 matt Exp $ */
+/* $NetBSD: exec_elf.c,v 1.35 2012/02/03 20:11:54 matt Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.34 2012/02/01 21:49:52 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.35 2012/02/03 20:11:54 matt Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -95,6 +95,7 @@ extern struct emul emul_netbsd;
#define netbsd_elf_signature ELFNAME2(netbsd,signature)
#define netbsd_elf_probe ELFNAME2(netbsd,probe)
#define coredump ELFNAMEEND(coredump)
+#define elf_free_emul_arg ELFNAME(free_emul_arg)
int elf_load_file(struct lwp *, struct exec_package *, char *,
struct exec_vmcmd_set *, u_long *, struct elf_args *, Elf_Addr *);
@@ -105,6 +106,8 @@ int netbsd_elf_signature(struct lwp *, s
int netbsd_elf_probe(struct lwp *, struct exec_package *, void *, char *,
vaddr_t *);
+static void elf_free_emul_arg(void *);
+
/* round up and down to page boundaries. */
#define ELF_ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1))
#define ELF_TRUNC(a, b) ((a) & ~((b) - 1))
@@ -241,8 +244,7 @@ elf_copyargs(struct lwp *l, struct exec_
a++;
}
- kmem_free(ap, sizeof(*ap));
- pack->ep_emul_arg = NULL;
+ exec_free_emul_arg(pack);
}
a->a_type = AT_NULL;
@@ -814,6 +816,7 @@ exec_elf_makecmds(struct lwp *l, struct
ap->arg_phnum = eh->e_phnum;
ap->arg_entry = eh->e_entry;
epp->ep_emul_arg = ap;
+ epp->ep_emul_arg_free = elf_free_emul_arg;
}
#ifdef ELF_MAP_PAGE_ZERO
@@ -827,8 +830,7 @@ exec_elf_makecmds(struct lwp *l, struct
bad:
if (interp)
PNBUF_PUT(interp);
- if (ap)
- kmem_free(ap, sizeof(*ap));
+ exec_free_emul_arg(epp);
kmem_free(ph, phsize);
kill_vmcmds(&epp->ep_vmcmds);
return error;
@@ -951,3 +953,11 @@ netbsd_elf_probe(struct lwp *l, struct e
epp->ep_flags |= EXEC_FORCEAUX;
return 0;
}
+
+void
+elf_free_emul_arg(void *arg)
+{
+ struct elf_args *ap = arg;
+ KASSERT(ap != NULL);
+ kmem_free(ap, sizeof(*ap));
+}
Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.335 src/sys/kern/kern_exec.c:1.336
--- src/sys/kern/kern_exec.c:1.335 Wed Jan 25 18:26:26 2012
+++ src/sys/kern/kern_exec.c Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.335 2012/01/25 18:26:26 christos Exp $ */
+/* $NetBSD: kern_exec.c,v 1.336 2012/02/03 20:11:54 matt Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.335 2012/01/25 18:26:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.336 2012/02/03 20:11:54 matt Exp $");
#include "opt_exec.h"
#include "opt_ktrace.h"
@@ -652,6 +652,7 @@ execve1(struct lwp *l, const char *path,
pack.ep_hdrlen = exec_maxhdrsz;
pack.ep_hdrvalid = 0;
pack.ep_emul_arg = NULL;
+ pack.ep_emul_arg_free = NULL;
pack.ep_vmcmds.evs_cnt = 0;
pack.ep_vmcmds.evs_used = 0;
pack.ep_vap = &attr;
@@ -1344,8 +1345,7 @@ execve1(struct lwp *l, const char *path,
*/
uvm_deallocate(&vm->vm_map, VM_MIN_ADDRESS,
VM_MAXUSER_ADDRESS - VM_MIN_ADDRESS);
- if (pack.ep_emul_arg)
- free(pack.ep_emul_arg, M_TEMP);
+ exec_free_emul_arg(&pack);
pool_put(&exec_pool, argp);
kmem_free(pack.ep_hdr, pack.ep_hdrlen);
if (pack.ep_emul_root != NULL)
@@ -1682,3 +1682,16 @@ exec_sigcode_map(struct proc *p, const s
p->p_sigctx.ps_sigcode = (void *)va;
return (0);
}
+
+void
+exec_free_emul_arg(struct exec_package *epp)
+{
+ if (epp->ep_emul_arg_free != NULL) {
+ KASSERT(epp->ep_emul_arg != NULL);
+ (*epp->ep_emul_arg_free)(epp->ep_emul_arg);
+ epp->ep_emul_arg_free = NULL;
+ epp->ep_emul_arg = NULL;
+ } else {
+ KASSERT(epp->ep_emul_arg == NULL);
+ }
+}
Index: src/sys/sys/exec.h
diff -u src/sys/sys/exec.h:1.133 src/sys/sys/exec.h:1.134
--- src/sys/sys/exec.h:1.133 Fri Mar 4 22:25:32 2011
+++ src/sys/sys/exec.h Fri Feb 3 20:11:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.h,v 1.133 2011/03/04 22:25:32 joerg Exp $ */
+/* $NetBSD: exec.h,v 1.134 2012/02/03 20:11:54 matt Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -214,6 +214,8 @@ struct exec_package {
struct vnode *ep_interp; /* vnode of (elf) interpeter */
uint32_t ep_pax_flags; /* pax flags */
char *ep_path; /* absolute path of executable */
+ void (*ep_emul_arg_free)(void *);
+ /* free ep_emul_arg */
};
#define EXEC_INDIR 0x0001 /* script handling already done */
#define EXEC_HASFD 0x0002 /* holding a shell script */
@@ -268,6 +270,9 @@ int exec_read_from (struct lwp *, struc
int exec_setup_stack (struct lwp *, struct exec_package *);
int coredump_write (void *, enum uio_seg, const void *, size_t);
+
+void exec_free_emul_arg (struct exec_package *);
+
/*
* Machine dependent functions
*/