minix/servers/vfs/exec.h
Ben Gras 53002f6f6c recognize and execute dynamically linked executables
. generalize libexec slightly to get some more necessary information
	  from ELF files, e.g. the interpreter
	. execute dynamically linked executables when exec()ed by VFS
	. switch to netbsd variant of elf32.h exclusively, solves some
	  conflicting headers
2012-04-16 00:41:42 +00:00

29 lines
1.1 KiB
C

#ifndef _VFS_EXEC_H_
#define _VFS_EXEC_H_ 1
struct exec_info {
int proc_e; /* Process endpoint */
char *hdr; /* Exec file's header */
int hdr_len; /* How many bytes are in hdr */
vir_bytes pc; /* Entry point of exec file */
vir_bytes stack_top; /* Top of the stack */
vir_bytes frame_len; /* Stack size */
uid_t new_uid; /* Process UID after exec */
gid_t new_gid; /* Process GID after exec */
int load_text; /* Load text section? */
int setugid; /* Allow set{u,g}id execution? */
struct vnode *vp; /* Exec file's vnode */
struct vmnt *vmp; /* Exec file's vmnt */
struct stat sb; /* Exec file's stat structure */
char progname[PROC_NAME_LEN]; /* Program name */
int userflags; /* exec() flags from userland */
/* fields only used by elf and in VFS */
int is_dyn; /* Dynamically linked executable */
vir_bytes elf_phdr; /* Program header location */
vir_bytes elf_base; /* Userland addr load address */
int elf_main_fd; /* Dyn: FD of main program execuatble */
};
#endif /* !_VFS_EXEC_H_ */