From 3afed5447bea8431325c74959aab4eb0659c55ec Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 4 Apr 1995 18:36:09 +0000 Subject: (main): Wire text and data segment on startup to avoid failure mode during non-standalone pseudo-crash. --- proc/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3