7 typedef uint32 Elf32_Addr
;
8 typedef uint16 Elf32_Half
;
9 typedef uint32 Elf32_Off
;
10 typedef int32 Elf32_Sword
;
11 typedef uint32 Elf32_Word
;
31 #define ELFCLASSNONE 0
41 unsigned char e_ident
[EI_NIDENT
];
50 Elf32_Half e_phentsize
;
52 Elf32_Half e_shentsize
;
54 Elf32_Half e_shstrndx
;
57 // e_ident EI_CLASS and EI_DATA values
58 #define ELFCLASSNONE 0
65 // special section header indices
67 #define SHN_LORESERVE 0xff00
68 #define SHN_LOPROC 0xff00
69 #define SHN_HIPROC 0xff1f
70 #define SHN_ABS 0xfff1
71 #define SHN_COMMON 0xfff2
72 #define SHN_HIRESERVE 0xffff
94 #define PT_LOPROC 0x70000000
95 #define PT_HIPROC 0x7fffffff
107 Elf32_Word sh_addralign
;
108 Elf32_Word sh_entsize
;
113 #define SHT_PROGBITS 1
118 #define SHT_DYNAMIC 6
123 #define SHT_DYNSYM 11
124 #define SHT_LOPROC 0x70000000
125 #define SHT_HIPROC 0x7fffffff
126 #define SHT_LOUSER 0x80000000
127 #define SHT_HIUSER 0xffffffff
135 // relocation entry with addend
139 Elf32_Sword r_addend
;
143 #define ELF32_R_SYM(i) ((i) >> 8)
144 #define ELF32_R_TYPE(i) ((unsigned char)(i))
145 #define ELF32_R_INFO(s, t) ((s) << 8 + (unsigned char)(t))
147 // relocation types (i368 specific)
151 #define R_386_GOT32 3
152 #define R_386_PLT32 4
154 #define R_386_GLOB_DAT 6
155 #define R_386_JMP_SLOT 7
156 #define R_386_RELATIVE 8
157 #define R_386_GOTOFF 9
158 #define R_386_GOTPC 10
160 // symbol table entry
171 #define ELF32_ST_BIND(i) ((i) >> 4)
172 #define ELF32_ST_TYPE(i) ((i) & 0xf)
173 #define ELF32_ST_INFO(b, t) ((b) << 4 + (t) & 0xf)
179 #define STB_LOPROC 13
180 #define STB_HIPROC 15
186 #define STT_SECTION 3
188 #define STT_LOPROC 13
189 #define STT_HIPROC 15