]> pd.if.org Git - zpackage/commitdiff
add program header table info to elf.h
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 16 Nov 2016 10:06:45 +0000 (10:06 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Wed, 16 Nov 2016 10:06:45 +0000 (10:06 +0000)
elf/elf.h

index d201dfcf35f1e47172fc555a41ea06911cf9c8f1..ad2d03ed98ebe085c23108d7e7fcfd6230e7b273 100644 (file)
--- 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;