proc: enter into userspace
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
1a8061e3b3
commit
cd916f624b
12 changed files with 138 additions and 29 deletions
|
|
@ -12,9 +12,9 @@
|
|||
#define PT_DYNAMIC 2 /* Dynamic linking information */
|
||||
#define PT_INTERP 3 /* Program interpreter */
|
||||
|
||||
#define PF_X (1 << 0) /* Segment is executable */
|
||||
#define PF_W (1 << 1) /* Segment is writable */
|
||||
#define PF_R (1 << 2) /* Segment is readable */
|
||||
#define PF_X (1 << 0) /* Segment is executable */
|
||||
#define PF_W (1 << 1) /* Segment is writable */
|
||||
#define PF_R (1 << 2) /* Segment is readable */
|
||||
|
||||
#define EM_X86_64 62
|
||||
|
||||
|
|
@ -54,6 +54,6 @@ struct phdr {
|
|||
Elf64_Xword p_align; /* Segment alignment */
|
||||
} PACKED;
|
||||
|
||||
int elf_get_headers(const char *file, struct ehdr **out_ehdr, struct phdr **out_phdrs);
|
||||
int elf_get_headers(const char *file, struct ehdr **out_ehdr, struct phdr **out_phdrs, uaddr_t *entry);
|
||||
|
||||
#endif /* _ELF_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue