summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-03-25 21:55:15 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-03-25 21:55:15 +0000
commitbb14affdff8188e0e5aa4e047b63bd2f3a091d80 (patch)
tree9564a53a1dc194e945ed77124cac03909f8b2b55 /init
parent561dba371aa5e67b26264c5880db24052fd284cf (diff)
Include <wire.h>.
(main): Delete declarations of _etext _edata, and __data_start. (main): Use new wire_task_self function instead of doing it ourselves.
Diffstat (limited to 'init')
-rw-r--r--init/init.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/init/init.c b/init/init.c
index b17941e3..163df58e 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1,5 +1,5 @@
/* Init that only bootstraps the hurd and runs sh.
- Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -402,7 +402,6 @@ main (int argc, char **argv, char **envp)
volatile int err;
int i;
mach_port_t consdev;
- extern char _edata, _etext, __data_start;
global_argv = argv;
@@ -429,18 +428,7 @@ main (int argc, char **argv, char **envp)
|| device_open (device_master, D_WRITE, "console", &consdev))
crash_mach ();
- {
- extern void _start ();
- vm_address_t text_start = (vm_address_t) &_start;
- err = vm_wire (host_priv, mach_task_self (),
- (vm_address_t) text_start,
- (vm_size_t) (&_etext - text_start),
- VM_PROT_READ|VM_PROT_EXECUTE);
- err = vm_wire (host_priv, mach_task_self (),
- (vm_address_t) &__data_start,
- (vm_size_t) (&_edata - &__data_start),
- VM_PROT_READ|VM_PROT_WRITE);
- }
+ wire_task_self ();
/* Clear our bootstrap port so our children don't inherit it. */
task_set_bootstrap_port (mach_task_self (), MACH_PORT_NULL);