diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-04-04 18:36:09 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-04-04 18:36:09 +0000 |
commit | 3afed5447bea8431325c74959aab4eb0659c55ec (patch) | |
tree | b34541e40ae98867fb26b0482d562ba912696d16 | |
parent | e03625d66647664d28055be13d3e625aac875542 (diff) |
(main): Wire text and data segment on startup to avoid failure mode
during non-standalone pseudo-crash.
-rw-r--r-- | proc/main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/proc/main.c b/proc/main.c index f939518e..b3b8077f 100644 --- a/proc/main.c +++ b/proc/main.c @@ -1,5 +1,5 @@ /* Initialization of the proc server - Copyright (C) 1993, 1994 Free Software Foundation + Copyright (C) 1993, 1994, 1995 Free Software Foundation This file is part of the GNU Hurd. @@ -100,6 +100,19 @@ main (int argc, char **argv, char **envp) mach_port_deallocate (mach_task_self (), pset); mach_port_deallocate (mach_task_self (), psetcntl); + { + extern void _start (); + vm_address_t text_start = (vm_address_t) &_start; + err = vm_wire (master_host_port, mach_task_self (), + (vm_address_t) text_start, + (vm_size_t) (&_etext - text_start), + VM_PROT_READ|VM_PROT_EXECUTE); + err = vm_wire (master_host_port, mach_task_self (), + (vm_address_t) &__data_start, + (vm_size_t) (&_edata - &__data_start), + VM_PROT_READ|VM_PROT_WRITE); + } + while (1) mach_msg_server (message_demuxer, 0, request_portset); } |