Rev 856 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 856 | Rev 909 | ||
---|---|---|---|
Line 131... | Line 131... | ||
131 | #define SHF_WRITE 0x1 |
131 | #define SHF_WRITE 0x1 |
132 | #define SHF_ALLOC 0x2 |
132 | #define SHF_ALLOC 0x2 |
133 | #define SHF_EXECINSTR 0x4 |
133 | #define SHF_EXECINSTR 0x4 |
134 | #define SHF_MASKPROC 0xf0000000 |
134 | #define SHF_MASKPROC 0xf0000000 |
135 | 135 | ||
- | 136 | ||
- | 137 | /** |
|
- | 138 | * Symbol binding |
|
- | 139 | */ |
|
- | 140 | #define STB_LOCAL 0 |
|
- | 141 | #define STB_GLOBAL 1 |
|
- | 142 | #define STB_WEAK 2 |
|
- | 143 | #define STB_LOPROC 13 |
|
- | 144 | #define STB_HIPROC 15 |
|
- | 145 | ||
- | 146 | /** |
|
- | 147 | * Symbol types |
|
- | 148 | */ |
|
- | 149 | #define STT_NOTYPE 0 |
|
- | 150 | #define STT_OBJECT 1 |
|
- | 151 | #define STT_FUNC 2 |
|
- | 152 | #define STT_SECTION 3 |
|
- | 153 | #define STT_FILE 4 |
|
- | 154 | #define STT_LOPROC 13 |
|
- | 155 | #define STT_HIPROC 15 |
|
- | 156 | ||
- | 157 | ||
- | 158 | /** |
|
- | 159 | * Program segment types |
|
- | 160 | */ |
|
- | 161 | #define PT_NULL 0 |
|
- | 162 | #define PT_LOAD 1 |
|
- | 163 | #define PT_DYNAMIC 2 |
|
- | 164 | #define PT_INTERP 3 |
|
- | 165 | #define PT_NOTE 4 |
|
- | 166 | #define PT_SHLIB 5 |
|
- | 167 | #define PT_PHDR 6 |
|
- | 168 | #define PT_LOPROC 0x70000000 |
|
- | 169 | #define PT_HIPROC 0x7fffffff |
|
- | 170 | ||
136 | /** |
171 | /** |
137 | * 32-bit ELF data types |
172 | * 32-bit ELF data types |
138 | */ |
173 | */ |
139 | typedef __u32 elf32_addr; |
174 | typedef __u32 elf32_addr; |
140 | typedef __u16 elf32_half; |
175 | typedef __u16 elf32_half; |
Line 178... | Line 213... | ||
178 | elf32_word sh_addralign; |
213 | elf32_word sh_addralign; |
179 | elf32_word sh_entsize; |
214 | elf32_word sh_entsize; |
180 | }; |
215 | }; |
181 | 216 | ||
182 | 217 | ||
- | 218 | /* |
|
- | 219 | * 32-bit ELF symbol table entry |
|
- | 220 | */ |
|
- | 221 | struct elf32_symbol { |
|
- | 222 | elf32_word st_name; |
|
- | 223 | elf32_addr st_value; |
|
- | 224 | elf32_word st_size; |
|
- | 225 | __u8 st_info; |
|
- | 226 | __u8 st_other; |
|
- | 227 | elf32_half st_shndx; |
|
- | 228 | }; |
|
- | 229 | ||
- | 230 | ||
- | 231 | /* |
|
- | 232 | * 32-bit ELF program header |
|
- | 233 | */ |
|
- | 234 | struct elf32_program_header { |
|
- | 235 | elf32_word p_type; |
|
- | 236 | elf32_off p_offset; |
|
- | 237 | elf32_addr pv_addr; |
|
- | 238 | elf32_addr pp_addr; |
|
- | 239 | elf32_word p_filesz; |
|
- | 240 | elf32_word p_memsz; |
|
- | 241 | elf32_word p_flags; |
|
- | 242 | elf32_word p_align; |
|
- | 243 | }; |
|
- | 244 | ||
183 | typedef struct elf32_header elf32_header_t; |
245 | typedef struct elf32_header elf32_header_t; |
184 | typedef struct elf32_section_header elf32_section_header_t; |
246 | typedef struct elf32_section_header elf32_section_header_t; |
- | 247 | typedef struct elf32_symbol elf32_symbol_t; |
|
- | 248 | typedef struct elf32_program_header elf32_program_header_t; |
|
- | 249 | ||
185 | 250 | ||
186 | 251 | ||
187 | extern int elf32_load(__address header, as_t * as); |
252 | extern int elf32_load(__address header, as_t * as); |
188 | 253 | ||
189 | #endif |
254 | #endif |