|
Packit |
6c4009 |
/* Data from initial program startup for running under the GNU Hurd.
|
|
Packit |
6c4009 |
Copyright (C) 1995-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _HURDSTARTUP_H
|
|
Packit |
6c4009 |
#define _HURDSTARTUP_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# include <stdint.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Interesting data saved from the exec_startup reply.
|
|
Packit |
6c4009 |
The DATA argument to *MAIN (see below) points to:
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
int argc;
|
|
Packit |
6c4009 |
char *argv[argc];
|
|
Packit |
6c4009 |
char *argv_terminator = NULL;
|
|
Packit |
6c4009 |
char *envp[?];
|
|
Packit |
6c4009 |
char *envp_terminator = NULL;
|
|
Packit |
6c4009 |
struct hurd_startup_data data;
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
struct hurd_startup_data
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
int flags;
|
|
Packit |
6c4009 |
mach_port_t *dtable;
|
|
Packit |
6c4009 |
mach_msg_type_number_t dtablesize;
|
|
Packit |
6c4009 |
mach_port_t *portarray;
|
|
Packit |
6c4009 |
mach_msg_type_number_t portarraysize;
|
|
Packit |
6c4009 |
int *intarray;
|
|
Packit |
6c4009 |
mach_msg_type_number_t intarraysize;
|
|
Packit |
6c4009 |
vm_address_t stack_base;
|
|
Packit |
6c4009 |
vm_size_t stack_size;
|
|
Packit |
6c4009 |
vm_address_t phdr;
|
|
Packit |
6c4009 |
vm_size_t phdrsz;
|
|
Packit |
6c4009 |
vm_address_t user_entry;
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Initialize Mach RPCs; do initial handshake with the exec server (or
|
|
Packit |
6c4009 |
extract the arguments from the stack in the case of the bootstrap task);
|
|
Packit |
6c4009 |
finally, call *MAIN with the information gleaned. That function is not
|
|
Packit |
6c4009 |
expected to return. ARGPTR should be the address of the first argument
|
|
Packit |
6c4009 |
of the entry point function that is called with the stack exactly as the
|
|
Packit |
6c4009 |
exec server or kernel sets it. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extern void _hurd_startup (void **argptr, void (*main) (intptr_t *data));
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* hurdstartup.h */
|