2010-12-10 10:27:56 +01:00
|
|
|
#ifndef _VFS_EXEC_H_
|
|
|
|
#define _VFS_EXEC_H_ 1
|
|
|
|
|
|
|
|
struct exec_info {
|
|
|
|
int proc_e; /* Process endpoint */
|
|
|
|
char *hdr; /* Exec file's header */
|
2012-04-03 15:52:25 +02:00
|
|
|
int hdr_len; /* How many bytes are in hdr */
|
2010-12-10 10:27:56 +01:00
|
|
|
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? */
|
2011-11-28 11:03:43 +01:00
|
|
|
int setugid; /* Allow set{u,g}id execution? */
|
2010-12-10 10:27:56 +01:00
|
|
|
struct vnode *vp; /* Exec file's vnode */
|
2012-04-03 15:52:25 +02:00
|
|
|
struct vmnt *vmp; /* Exec file's vmnt */
|
2010-12-10 10:27:56 +01:00
|
|
|
struct stat sb; /* Exec file's stat structure */
|
|
|
|
char progname[PROC_NAME_LEN]; /* Program name */
|
2012-04-03 15:52:25 +02:00
|
|
|
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 */
|
2012-04-18 16:32:38 +02:00
|
|
|
char execname[PATH_MAX]; /* Full executable invocation */
|
2010-12-10 10:27:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* !_VFS_EXEC_H_ */
|