diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-04-18 15:58:34 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-04-18 15:58:34 +0000 |
commit | a6a715c7a6fe45922172c2af5ada0becdc68d9a5 (patch) | |
tree | 9d526cca84208ad9f2194087e103a31461b05bf1 /sys/kern/exec_elf.c | |
parent | 6bae5ce99d15027f5ece30547d65f1b5d655541a (diff) |
Support mapping of page zero read-only if COMPAT_SVR4_MAP_PAGE_ZERO
is used. Dell SVR4 behaved this way, and some binaries rely on such icky
behaviour.
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r-- | sys/kern/exec_elf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index a32eaabe1b5..b07a0ded462 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.3 1996/03/03 17:19:37 niklas Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.4 1996/04/18 15:58:33 niklas Exp $ */ /* $NetBSD: exec_elf.c,v 1.6 1996/02/09 18:59:18 christos Exp $ */ /* @@ -531,6 +531,12 @@ exec_elf_makecmds(p, epp) } else epp->ep_entry = eh->e_entry; +#ifdef COMPAT_SVR4_MAP_PAGE_ZERO + /* Dell SVR4 maps page zero, yeuch! */ + NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, NBPG, 0, epp->ep_vp, 0, + VM_PROT_READ); +#endif + free((char *) ph, M_TEMP); epp->ep_vp->v_flag |= VTEXT; return exec_aout_setup_stack(p, epp); |