2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
10 typedef uint32 Elf32_Addr
;
11 typedef uint16 Elf32_Half
;
12 typedef uint32 Elf32_Off
;
13 typedef int32 Elf32_Sword
;
14 typedef uint32 Elf32_Word
;
16 #define ELF_MAGIC "\x7f""ELF"
33 unsigned char e_ident
[EI_NIDENT
];
42 Elf32_Half e_phentsize
;
44 Elf32_Half e_shentsize
;
46 Elf32_Half e_shstrndx
;
58 Elf32_Word sh_addralign
;
59 Elf32_Word sh_entsize
;
63 #define SHT_PROGBITS 1
74 #define SHT_LOPROC 0x70000000
75 #define SHT_HIPROC 0x7fffffff
76 #define SHT_LOUSER 0x80000000
77 #define SHT_HIUSER 0xffffffff
95 #define PF_MASKPROC 0xf0000000
105 #define PT_LOPROC 0x70000000
106 #define PT_HIPROC 0x7fffffff
112 unsigned char st_info
;
113 unsigned char st_other
;
117 #define ELF32_ST_BIND(i) ((i) >> 4)
118 #define ELF32_ST_TYPE(i) ((i) & 0xf)
119 #define ELF32_ST_INFO(b, t) (((b) << 4) + ((t) & 0xf))
124 #define STT_SECTION 3
126 #define STT_LOPROC 13
127 #define STT_HIPROC 15
139 Elf32_Sword r_addend
;
142 #define ELF32_R_SYM(i) ((i) >> 8)
143 #define ELF32_R_TYPE(i) ((unsigned char)(i))
144 #define ELF32_R_INFO(s, t) (((s) << 8) + (unsigned char)(t))
156 #define DT_PLTRELSZ 2
170 #define DT_SYMBOLIC 16
176 #define DT_TEXTREL 22
178 #define DT_LOPROC 0x70000000
179 #define DT_HIPROC 0x7fffffff