OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COURGETTE_ELF_TYPES_H_ | 5 #ifndef COURGETTE_ELF_TYPES_H_ |
6 #define COURGETTE_ELF_TYPES_H_ | 6 #define COURGETTE_ELF_TYPES_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 // | 10 // |
9 // This header defines various types from the ELF file spec, but no code | 11 // This header defines various types from the ELF file spec, but no code |
10 // related to using them. | 12 // related to using them. |
11 // | 13 // |
12 | 14 |
13 typedef uint32 Elf32_Addr; // Unsigned program address | 15 typedef uint32_t Elf32_Addr; // Unsigned program address |
14 typedef uint16 Elf32_Half; // Unsigned medium integer | 16 typedef uint16_t Elf32_Half; // Unsigned medium integer |
15 typedef uint32 Elf32_Off; // Unsigned file offset | 17 typedef uint32_t Elf32_Off; // Unsigned file offset |
16 typedef int32 Elf32_Sword; // Signed large integer | 18 typedef int32_t Elf32_Sword; // Signed large integer |
17 typedef uint32 Elf32_Word; // Unsigned large integer | 19 typedef uint32_t Elf32_Word; // Unsigned large integer |
18 | |
19 | 20 |
20 // The header at the top of the file | 21 // The header at the top of the file |
21 struct Elf32_Ehdr { | 22 struct Elf32_Ehdr { |
22 unsigned char e_ident[16]; | 23 unsigned char e_ident[16]; |
23 Elf32_Half e_type; | 24 Elf32_Half e_type; |
24 Elf32_Half e_machine; | 25 Elf32_Half e_machine; |
25 Elf32_Word e_version; | 26 Elf32_Word e_version; |
26 Elf32_Addr e_entry; | 27 Elf32_Addr e_entry; |
27 Elf32_Off e_phoff; | 28 Elf32_Off e_phoff; |
28 Elf32_Off e_shoff; | 29 Elf32_Off e_shoff; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 R_386_GOTOFF = 9, | 140 R_386_GOTOFF = 9, |
140 R_386_GOTPC = 10, | 141 R_386_GOTPC = 10, |
141 R_386_TLS_TPOFF = 14, | 142 R_386_TLS_TPOFF = 14, |
142 }; | 143 }; |
143 | 144 |
144 enum elf32_rel_arm_type_values { | 145 enum elf32_rel_arm_type_values { |
145 R_ARM_RELATIVE = 23, | 146 R_ARM_RELATIVE = 23, |
146 }; | 147 }; |
147 | 148 |
148 #endif // COURGETTE_ELF_TYPES_H_ | 149 #endif // COURGETTE_ELF_TYPES_H_ |
OLD | NEW |