*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: nlist.c,v 1.16 1996/10/27 20:34:37 etheisen Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.17 1996/12/23 02:42:22 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <unistd.h>
#include <a.out.h> /* pulls in nlist.h */
-#ifdef DO_ELF
+#ifdef _NLIST_DO_ELF
#include <elf_abi.h>
#include <olf_abi.h>
#endif
-#ifdef DO_ECOFF
+#ifdef _NLIST_DO_ECOFF
#include <sys/exec_ecoff.h>
#endif
#define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0)
-#ifdef DO_AOUT
+#ifdef _NLIST_DO_AOUT
int
__aout_fdnlist(fd, list)
register int fd;
munmap(strtab, strsize);
return (nent);
}
-#endif /* DO_AOUT */
+#endif /* _NLIST_DO_AOUT */
-#ifdef DO_ECOFF
+#ifdef _NLIST_DO_ECOFF
#define check(off, size) ((off < 0) || (off + size > mappedsize))
#define BAD do { rv = -1; goto out; } while (0)
#define BADUNMAP do { rv = -1; goto unmap; } while (0)
out:
return (rv);
}
-#endif /* DO_ECOFF */
+#endif /* _NLIST_DO_ECOFF */
-#ifdef DO_ELF
+#ifdef _NLIST_DO_ELF
/*
* __elf_is_okay__ - Determine if ehdr really
* is ELF and valid for the target platform.
return (nent);
}
-#endif /* DO_ELF */
+#endif /* _NLIST_DO_ELF */
static struct nlist_handlers {
int (*fn) __P((int fd, struct nlist *list));
} nlist_fn[] = {
-#ifdef DO_AOUT
+#ifdef _NLIST_DO_AOUT
{ __aout_fdnlist },
#endif
-#ifdef DO_ELF
+#ifdef _NLIST_DO_ELF
{ __elf_fdnlist },
#endif
-#ifdef DO_ECOFF
+#ifdef _NLIST_DO_ECOFF
{ __ecoff_fdnlist },
#endif
};
-/* $OpenBSD: exec.h,v 1.3 1996/07/29 22:58:42 niklas Exp $ */
+/* $OpenBSD: exec.h,v 1.4 1996/12/23 02:42:24 deraadt Exp $ */
/* $NetBSD: exec.h,v 1.1 1995/02/13 23:07:37 cgd Exp $ */
/*
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_ALPHA
-#define DO_AOUT /* support a.out */
-#define DO_ECOFF /* support ECOFF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ECOFF
+
+#define _KERN_DO_AOUT
+#define _KERN_DO_ECOFF
#endif /* !_ALPHA_EXEC_H_ */
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_68K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#define _KERN_DO_KERN
+#endif
#endif /* _MACHINE_EXEC_H_ */
-/* $OpenBSD: exec.h,v 1.1.1.1 1996/06/24 09:07:17 pefo Exp $ */
+/* $OpenBSD: exec.h,v 1.2 1996/12/23 02:42:26 deraadt Exp $ */
/* $NetBSD: exec.h,v 1.5 1994/10/26 21:09:39 cgd Exp $ */
/*-
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_MIPS
-/*
- * This is what we want nlist(3) to handle.
- */
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
-#define DO_ECOFF /* support ECOFF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+#define _NLIST_DO_ECOFF
+#define _KERN_DO_ECOFF
+#define _KERN_DO_ELF
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_ARM
-#define DO_AOUT /* support a.out */
+#define _NLIST_DO_AOUT
+
+#define _KERN_DO_AOUT
#endif /* _ARM_EXEC_H_ */
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_68K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#define _KERN_DO_ELF
+#endif
#endif /* _MACHINE_EXEC_H_ */
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_68K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#define _KERN_DO_ELF
+#endif
#endif /* _MACHINE_EXEC_H_ */
#define ELF_TARG_MACH EM_386 /* XXX - EM_486 is currently unused
by all OSs/compilers/linkers */
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4) || !defined(_KERNEL)
+#define _KERN_DO_ELF
+#endif
#endif /* _I386_EXEC_H_ */
-/* $OpenBSD: exec.h,v 1.4 1996/05/29 03:05:00 deraadt Exp $ */
+/* $OpenBSD: exec.h,v 1.5 1996/12/23 02:42:30 deraadt Exp $ */
/* $NetBSD: exec.h,v 1.8 1996/05/05 06:17:40 briggs Exp $ */
/*-
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_68K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#define _KERN_DO_ELF
+#endif
#endif /* _EXEC_MACHINE_ */
-/* $OpenBSD: exec.h,v 1.4 1996/05/29 03:05:01 deraadt Exp $ */
+/* $OpenBSD: exec.h,v 1.5 1996/12/23 02:42:31 deraadt Exp $ */
/*
* Copyright (c) 1993 Christopher G. Demetriou
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_68K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#define _KERN_DO_ELF
+#endif
#endif /* _MACHINE_EXEC_H_ */
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_88K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#define _KERN_DO_ELF
#endif /* __A_OUT_GNU_H__ */
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_32K
-#define DO_AOUT /* support a.out */
+#define _NLIST_DO_AOUT
+
+#define _KERN_DO_AOUT
#endif /* _PC532_EXEC_H_ */
-/* $OpenBSD: exec.h,v 1.6 1996/12/22 15:22:22 graichen Exp $ */
+/* $OpenBSD: exec.h,v 1.7 1996/12/23 02:42:34 deraadt Exp $ */
/* $NetBSD: exec.h,v 1.5 1994/10/26 21:09:39 cgd Exp $ */
/*-
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_MIPS
-/*
- * This is what we want nlist(3) to handle.
- */
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
-#define DO_ECOFF /* support ECOFF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+#define _NLIST_DO_ECOFF
+#undef _KERN_DO_AOUT
+#define _KERN_DO_ELF
+#define _KERN_DO_ECOFF
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: exec.h,v 1.1.1.1 1996/12/21 20:35:54 rahnds Exp $
+ * $Id: exec.h,v 1.2 1996/12/23 02:42:35 deraadt Exp $
*/
#ifndef _PPC_EXEC_H_
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_PPC
-/*
- * This is what we want nlist(3) to handle.
- */
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+#define _KERN_DO_ELF
#endif /* _PPC_EXEC_H_ */
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_SPARC
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4)
+#define _KERN_DO_ELF
+#endif
#endif /* _SPARC_EXEC_H_ */
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_68K
-#define DO_AOUT /* support a.out */
-#define DO_ELF /* support ELF */
+#define _NLIST_DO_AOUT
+
+#define _KERN_DO_AOUT
#endif /* _SUN3_EXEC_H_ */
};
#define relocation_info relocation_info_vax
+#define _NLIST_DO_AOUT
+
+#define _KERN_DO_AOUT
+
#endif /* _VAX_EXEC_H_ */
-# $OpenBSD: files,v 1.48 1996/11/30 13:39:20 niklas Exp $
+# $OpenBSD: files,v 1.49 1996/12/23 02:42:23 deraadt Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
file isofs/cd9660/cd9660_vnops.c cd9660
file kern/exec_aout.c
file kern/exec_conf.c
-file kern/exec_ecoff.c compat_ultrix | compat_osf1 | exec_ecoff
-file kern/exec_elf.c compat_svr4 | compat_linux | native_elf
+file kern/exec_ecoff.c
+file kern/exec_elf.c
file kern/exec_script.c
file kern/exec_subr.c
file kern/init_main.c
-/* $OpenBSD: exec_aout.c,v 1.2 1996/03/03 17:19:36 niklas Exp $ */
+/* $OpenBSD: exec_aout.c,v 1.3 1996/12/23 02:42:41 deraadt Exp $ */
/* $NetBSD: exec_aout.c,v 1.14 1996/02/04 02:15:01 christos Exp $ */
/*
#include <sys/resourcevar.h>
#include <vm/vm.h>
+#if defined(_KERN_DO_AOUT)
+
/*
* exec_aout_makecmds(): Check if it's an a.out-format executable.
*
epp->ep_daddr + execp->a_data, NULLVP, 0,
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
- return exec_aout_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
}
/*
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
NULLVP, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
- return exec_aout_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
}
/*
*/
dsize = epp->ep_dsize + execp->a_text - roundup(execp->a_text, NBPG);
epp->ep_dsize = (dsize > 0) ? dsize : 0;
- return exec_aout_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
}
-/*
- * exec_aout_setup_stack(): Set up the stack segment for an a.out
- * executable.
- *
- * Note that the ep_ssize parameter must be set to be the current stack
- * limit; this is adjusted in the body of execve() to yield the
- * appropriate stack segment usage once the argument length is
- * calculated.
- *
- * This function returns an int for uniformity with other (future) formats'
- * stack setup functions. They might have errors to return.
- */
-
-int
-exec_aout_setup_stack(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
-
- epp->ep_maxsaddr = USRSTACK - MAXSSIZ;
- epp->ep_minsaddr = USRSTACK;
- epp->ep_ssize = p->p_rlimit[RLIMIT_STACK].rlim_cur;
-
- /*
- * set up commands for stack. note that this takes *two*, one to
- * map the part of the stack which we can access, and one to map
- * the part which we can't.
- *
- * arguably, it could be made into one, but that would require the
- * addition of another mapping proc, which is unnecessary
- *
- * note that in memory, things assumed to be: 0 ....... ep_maxsaddr
- * <stack> ep_minsaddr
- */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero,
- ((epp->ep_minsaddr - epp->ep_ssize) - epp->ep_maxsaddr),
- epp->ep_maxsaddr, NULLVP, 0, VM_PROT_NONE);
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, epp->ep_ssize,
- (epp->ep_minsaddr - epp->ep_ssize), NULLVP, 0,
- VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- return 0;
-}
+#endif /* _KERN_DO_AOUT */
-/* $OpenBSD: exec_conf.c,v 1.6 1996/06/07 19:38:58 pefo Exp $ */
+/* $OpenBSD: exec_conf.c,v 1.7 1996/12/23 02:42:42 deraadt Exp $ */
/* $NetBSD: exec_conf.c,v 1.16 1995/12/09 05:34:47 cgd Exp $ */
/*
#include <sys/param.h>
#include <sys/exec.h>
-
-#undef EXEC_SCRIPT /* XXX */
-#define EXEC_SCRIPT /* XXX */
-#undef EXEC_AOUT /* XXX */
-#define EXEC_AOUT /* XXX */
-
-#if defined(COMPAT_ULTRIX) || defined(COMPAT_OSF1)
-#undef EXEC_ECOFF
-#define EXEC_ECOFF
-#endif
-
-#if defined(COMPAT_SVR4) || defined(COMPAT_LINUX)
-#undef EXEC_ELF
-#define EXEC_ELF
-#endif
-
-#ifdef EXEC_SCRIPT
#include <sys/exec_script.h>
-#endif
-#if defined(NATIVE_EXEC_AOUT) || defined(EXEC_AOUT)
-/*#include <sys/exec_aout.h> -- automatically pulled in */
-#endif
-
-#if defined(NATIVE_EXEC_ECOFF) || defined(EXEC_ECOFF)
+#if defined(_KERN_DO_ECOFF)
#include <sys/exec_ecoff.h>
#endif
-#if defined(NATIVE_EXEC_ELF) || defined(EXEC_ELF)
+#if defined(_KERN_DO_ELF)
#include <sys/exec_elf.h>
#endif
{ 0, NULL, },
{ 0, NULL, },
#endif
-#ifdef EXEC_SCRIPT
{ MAXINTERP, exec_script_makecmds, }, /* shell scripts */
-#endif
-#ifdef EXEC_AOUT
+#ifdef _KERN_DO_AOUT
{ sizeof(struct exec), exec_aout_makecmds, }, /* a.out binaries */
#endif
-#ifdef EXEC_ECOFF
+#ifdef _KERN_DO_ECOFF
{ ECOFF_HDR_SIZE, exec_ecoff_makecmds, }, /* ecoff binaries */
#endif
-#if defined(NATIVE_EXEC_ELF) || defined(EXEC_ELF)
+#ifdef _KERN_DO_ELF
{ sizeof(Elf32_Ehdr), exec_elf_makecmds, }, /* elf binaries */
#endif
#ifdef COMPAT_LINUX
{ XOUT_HDR_SIZE, exec_ibcs2_xout_makecmds, }, /* x.out binaries */
#endif
#ifdef COMPAT_FREEBSD
- { FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, }, /* a.out */
+ { FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, }, /* freebsd */
#endif
#ifdef COMPAT_HPUX
{ HPUX_EXEC_HDR_SIZE, exec_hpux_makecmds, }, /* HP-UX a.out */
-/* $OpenBSD: exec_ecoff.c,v 1.3 1996/05/22 12:05:19 deraadt Exp $ */
+/* $OpenBSD: exec_ecoff.c,v 1.4 1996/12/23 02:42:42 deraadt Exp $ */
/* $NetBSD: exec_ecoff.c,v 1.8 1996/05/19 20:36:06 jonathan Exp $ */
/*
#include <sys/resourcevar.h>
#include <vm/vm.h>
+#if defined(_KERN_DO_ECOFF)
+
#include <sys/exec_ecoff.h>
int exec_ecoff_prep_omagic __P((struct proc *, struct exec_package *));
return error;
}
-/*
- * exec_ecoff_setup_stack(): Set up the stack segment for an ecoff
- * executable.
- *
- * Note that the ep_ssize parameter must be set to be the current stack
- * limit; this is adjusted in the body of execve() to yield the
- * appropriate stack segment usage once the argument length is
- * calculated.
- *
- * This function returns an int for uniformity with other (future) formats'
- * stack setup functions. They might have errors to return.
- */
-int
-exec_ecoff_setup_stack(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
-
- epp->ep_maxsaddr = USRSTACK - MAXSSIZ;
- epp->ep_minsaddr = USRSTACK;
- epp->ep_ssize = p->p_rlimit[RLIMIT_STACK].rlim_cur;
-
- /*
- * set up commands for stack. note that this takes *two*, one to
- * map the part of the stack which we can access, and one to map
- * the part which we can't.
- *
- * arguably, it could be made into one, but that would require the
- * addition of another mapping proc, which is unnecessary
- *
- * note that in memory, things assumed to be: 0 ....... ep_maxsaddr
- * <stack> ep_minsaddr
- */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero,
- ((epp->ep_minsaddr - epp->ep_ssize) - epp->ep_maxsaddr),
- epp->ep_maxsaddr, NULLVP, 0, VM_PROT_NONE);
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, epp->ep_ssize,
- (epp->ep_minsaddr - epp->ep_ssize), NULLVP, 0,
- VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- return 0;
-}
-
/*
* exec_ecoff_prep_omagic(): Prepare a ECOFF OMAGIC binary's exec package
*/
ECOFF_SEGMENT_ALIGN(execp, eap->bss_start), NULLVP, 0,
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
- return exec_ecoff_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
}
/*
ECOFF_SEGMENT_ALIGN(execp, eap->bss_start), NULLVP, 0,
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
- return exec_ecoff_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
}
/*
ECOFF_SEGMENT_ALIGN(execp, eap->bss_start), NULLVP, 0,
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
- return exec_ecoff_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
}
+
+#endif /* _KERN_DO_ECOFF */
-/* $OpenBSD: exec_elf.c,v 1.18 1996/11/24 18:31:25 etheisen Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.19 1996/12/23 02:42:43 deraadt Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/exec.h>
+
+#if defined(_KERN_DO_ELF)
+
#include <sys/exec_elf.h>
#include <sys/exec_olf.h>
#include <sys/file.h>
#include <sys/signalvar.h>
#include <sys/stat.h>
-#if defined(COMPAT_LINUX) || defined(COMPAT_SVR4) /*XXX should be */
-#undef EXEC_ELF /*XXX defined in */
-#define EXEC_ELF /*XXX machine/exec.h */
-#endif /*XXX instead ? */
-
-#if defined(NATIVE_EXEC_ELF) || defined(EXEC_ELF)
-
#include <sys/mman.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
free((char *) ph, M_TEMP);
epp->ep_vp->v_flag |= VTEXT;
- return exec_aout_setup_stack(p, epp);
+ return exec_setup_stack(p, epp);
bad:
free((char *) ph, M_TEMP);
free((char *) interp, M_TEMP);
return error;
}
-#endif /* NATIVE_EXEC_ELF || EXEC_ELF */
+#endif /* _KERN_DO_ELF */
#include <sys/filedesc.h>
#include <sys/exec.h>
#include <sys/mman.h>
+#include <sys/resourcevar.h>
#include <vm/vm.h>
return vm_map_protect(&p->p_vmspace->vm_map, trunc_page(cmd->ev_addr),
round_page(cmd->ev_addr + cmd->ev_len), cmd->ev_prot, FALSE);
}
+
+/*
+ * exec_setup_stack(): Set up the stack segment for an a.out
+ * executable.
+ *
+ * Note that the ep_ssize parameter must be set to be the current stack
+ * limit; this is adjusted in the body of execve() to yield the
+ * appropriate stack segment usage once the argument length is
+ * calculated.
+ *
+ * This function returns an int for uniformity with other (future) formats'
+ * stack setup functions. They might have errors to return.
+ */
+
+int
+exec_setup_stack(p, epp)
+ struct proc *p;
+ struct exec_package *epp;
+{
+
+ epp->ep_maxsaddr = USRSTACK - MAXSSIZ;
+ epp->ep_minsaddr = USRSTACK;
+ epp->ep_ssize = p->p_rlimit[RLIMIT_STACK].rlim_cur;
+
+ /*
+ * set up commands for stack. note that this takes *two*, one to
+ * map the part of the stack which we can access, and one to map
+ * the part which we can't.
+ *
+ * arguably, it could be made into one, but that would require the
+ * addition of another mapping proc, which is unnecessary
+ *
+ * note that in memory, things assumed to be: 0 ....... ep_maxsaddr
+ * <stack> ep_minsaddr
+ */
+ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero,
+ ((epp->ep_minsaddr - epp->ep_ssize) - epp->ep_maxsaddr),
+ epp->ep_maxsaddr, NULLVP, 0, VM_PROT_NONE);
+ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, epp->ep_ssize,
+ (epp->ep_minsaddr - epp->ep_ssize), NULLVP, 0,
+ VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
+
+ return 0;
+}
-/* $OpenBSD: exec.h,v 1.4 1996/08/31 09:17:16 pefo Exp $ */
+/* $OpenBSD: exec.h,v 1.5 1996/12/23 02:42:39 deraadt Exp $ */
/* $NetBSD: exec.h,v 1.59 1996/02/09 18:25:09 christos Exp $ */
/*-
void setregs __P((struct proc *, struct exec_package *,
u_long, register_t *));
int check_exec __P((struct proc *, struct exec_package *));
+int exec_setup_stack __P((struct proc *, struct exec_package *));
#ifdef DEBUG
void new_vmcmd __P((struct exec_vmcmd_set *evsp,
-/* $OpenBSD: exec_aout.h,v 1.5 1996/06/25 20:48:58 deraadt Exp $ */
+/* $OpenBSD: exec_aout.h,v 1.6 1996/12/23 02:42:40 deraadt Exp $ */
/* $NetBSD: exec_aout.h,v 1.15 1996/05/18 17:20:54 christos Exp $ */
/*
int exec_aout_prep_zmagic __P((struct proc *, struct exec_package *));
int exec_aout_prep_nmagic __P((struct proc *, struct exec_package *));
int exec_aout_prep_omagic __P((struct proc *, struct exec_package *));
-int exec_aout_setup_stack __P((struct proc *, struct exec_package *));
/* For compatibility modules */
int exec_aout_prep_oldzmagic __P((struct proc *, struct exec_package *));