__mach_init ();
_hurd_startup (void **argptr, void (*main) (int *data)){  error_t err;  mach_port_t in_bootstrap;  char *args, *env;  mach_msg_type_number_t argslen, envlen;  struct hurd_startup_data data;  char **argv, **envp;  int argc, envc;  int *argcptr;  /* Basic Mach initialization, must be done before RPCs can be done.  */  __mach_init ();  if (err = __task_get_special_port (__mach_task_self (), TASK_BOOTSTRAP_PORT,				     &in_bootstrap))    LOSE;  if (in_bootstrap != MACH_PORT_NULL)    {      /* Call the exec server on our bootstrap port and	 get all our standard information from it.  */      argslen = envlen = 0;      data.dtablesize = data.portarraysize = data.intarraysize = 0;      err = __exec_startup (in_bootstrap,			    &data.stack_base, &data.stack_size,			    &data.flags, &args, &argslen, &env, &envlen,			    &data.dtable, &data.dtablesize,			    &data.portarray, &data.portarraysize,			    &data.intarray, &data.intarraysize);      __mach_port_deallocate (__mach_task_self (), in_bootstrap);    }  if (err || in_bootstrap == MACH_PORT_NULL)    {#if 0      /* Either we have no bootstrap port, or the RPC to the exec server	 failed.  Try to snarf the args in the canonical Mach way.	 Hopefully either they will be on the stack as expected, or the	 stack will be zeros so we don't crash.  Set all our other	 variables to have empty information.  */      ENTRY_SP (argptr);      /* SNARF_ARGS (ARGPTR, ARGC, ARGV, ENVP) snarfs the arguments and	 environment from the stack, assuming they were put there by the	 microkernel.  */XXX XXX XXX            SNARF_ARGS (argptr, argc, argv, envp);#endif      data.flags = 0;      args = env = NULL;      argslen = envlen = 0;      data.dtable = NULL;      data.dtablesize = 0;      data.portarray = NULL;      data.portarraysize = 0;      data.intarray = NULL;      data.intarraysize = 0;    }  else    argv = envp = NULL;  /* Turn the block of null-separated strings we were passed for the     arguments and environment into vectors of pointers to strings.  */    if (! argv)    {      /* Count up the arguments so we can allocate ARGV.  */      argc = _hurd_split_args (args, argslen, NULL);      /* Count up the environment variables so we can allocate ENVP.  */      envc = _hurd_split_args (env, envlen, NULL);      /* There were some arguments.  Allocate space for the vectors of	 pointers and fill them in.  We allocate the space for the	 environment pointers immediately after the argv pointers because	 the ELF ABI will expect it.  */      argcptr = __alloca (sizeof (int) +			  (argc + 1 + envc + 1) * sizeof (char *) +			  sizeof (struct hurd_startup_data));      *argcptr = argc;      argv = (void *) (argcptr + 1);      _hurd_split_args (args, argslen, argv);      /* There was some environment.  */      envp = &argv[argc + 1];      _hurd_split_args (env, envlen, envp);    }  {    struct hurd_startup_data *d = (void *) &envp[envc + 1];    /* XXX hardcoded until exec_startup changes */#ifdef PIC#if 0    const Elf32_Ehdr *ehdr = (const void *) 0x08000000;    vm_address_t phdr = 0x08000000 + ehdr->e_phoff;    vm_size_t phdrsz = ehdr->e_phnum * ehdr->e_phentsize;    vm_address_t user_entry = ehdr->e_entry;#else    vm_address_t phdr = 0;    vm_size_t phdrsz = 0;extern void _start();    vm_address_t user_entry = (vm_address_t) &_start;#endif#else    vm_address_t phdr = 0;    vm_size_t phdrsz = 0;    vm_address_t user_entry = 0;#endif    *d = data;    _hurd_init_dtable = d->dtable;    _hurd_init_dtablesize = d->dtablesize;    d->phdr = phdr;    d->phdrsz = phdrsz;    d->user_entry = user_entry;    (*main) (argcptr);  }  /* Should never get here.  */  LOSE;  abort ();}