From: Nathan Wagner Date: Wed, 16 Nov 2016 10:06:45 +0000 (+0000) Subject: add program header table info to elf.h X-Git-Tag: v0.1.6~158 X-Git-Url: https://pd.if.org/git/?a=commitdiff_plain;ds=sidebyside;h=227b2bc49acc70a5c3a7bc5fcff665c523816b83;p=zpackage add program header table info to elf.h --- diff --git a/elf/elf.h b/elf/elf.h index d201dfc..ad2d03e 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -80,6 +80,31 @@ typedef struct { Elf64_Xword sh_entsize; } Elf64_Shdr; +typedef struct { + Elf64_Word p_type; + Elf64_Word p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + Elf64_Xword p_filesz; + Elf64_Xword p_memsz; + Elf64_Xword p_align; +} Elf64_Phdr; + +#define PT_NULL 0 +#define PT_LOAD 1 +#define PT_DYNAMIC 2 +#define PT_INTERP 3 +#define PT_NOTE 4 +#define PT_SHLIB 5 +#define PT_PHDR 6 +#define PT_TLS 7 +#define PT_NUM 8 +#define PT_LOOS 0x60000000 +#define PT_HIOS 0x6fffffff +#define PT_LOPROC 0x70000000 +#define PT_HIPROC 0x7fffffff + typedef struct { Elf32_Word ch_type; Elf32_Word ch_size;