2 ext_types.h - external representation of ELF data types.
3 Copyright (C) 1995 - 1998 Michael Riepe
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20 /* @(#) $Id: ext_types.h,v 1.9 2008/05/23 08:15:34 michael Exp $ */
27 #endif /* __cplusplus */
32 typedef unsigned char __ext_Elf32_Addr [ELF32_FSZ_ADDR];
33 typedef unsigned char __ext_Elf32_Half [ELF32_FSZ_HALF];
34 typedef unsigned char __ext_Elf32_Off [ELF32_FSZ_OFF];
35 typedef unsigned char __ext_Elf32_Sword [ELF32_FSZ_SWORD];
36 typedef unsigned char __ext_Elf32_Word [ELF32_FSZ_WORD];
40 typedef unsigned char __ext_Elf32_Lword [8];
42 typedef unsigned char __ext_Elf64_Addr [ELF64_FSZ_ADDR];
43 typedef unsigned char __ext_Elf64_Half [ELF64_FSZ_HALF];
44 typedef unsigned char __ext_Elf64_Off [ELF64_FSZ_OFF];
45 typedef unsigned char __ext_Elf64_Sword [ELF64_FSZ_SWORD];
46 typedef unsigned char __ext_Elf64_Word [ELF64_FSZ_WORD];
47 typedef unsigned char __ext_Elf64_Sxword[ELF64_FSZ_SXWORD];
48 typedef unsigned char __ext_Elf64_Xword [ELF64_FSZ_XWORD];
50 typedef unsigned char __ext_Elf64_Lword [8];
52 #endif /* __LIBELF64 */
58 unsigned char e_ident[EI_NIDENT];
59 __ext_Elf32_Half e_type;
60 __ext_Elf32_Half e_machine;
61 __ext_Elf32_Word e_version;
62 __ext_Elf32_Addr e_entry;
63 __ext_Elf32_Off e_phoff;
64 __ext_Elf32_Off e_shoff;
65 __ext_Elf32_Word e_flags;
66 __ext_Elf32_Half e_ehsize;
67 __ext_Elf32_Half e_phentsize;
68 __ext_Elf32_Half e_phnum;
69 __ext_Elf32_Half e_shentsize;
70 __ext_Elf32_Half e_shnum;
71 __ext_Elf32_Half e_shstrndx;
76 unsigned char e_ident[EI_NIDENT];
77 __ext_Elf64_Half e_type;
78 __ext_Elf64_Half e_machine;
79 __ext_Elf64_Word e_version;
80 __ext_Elf64_Addr e_entry;
81 __ext_Elf64_Off e_phoff;
82 __ext_Elf64_Off e_shoff;
83 __ext_Elf64_Word e_flags;
84 __ext_Elf64_Half e_ehsize;
85 __ext_Elf64_Half e_phentsize;
86 __ext_Elf64_Half e_phnum;
87 __ext_Elf64_Half e_shentsize;
88 __ext_Elf64_Half e_shnum;
89 __ext_Elf64_Half e_shstrndx;
91 #endif /* __LIBELF64 */
97 __ext_Elf32_Word sh_name;
98 __ext_Elf32_Word sh_type;
99 __ext_Elf32_Word sh_flags;
100 __ext_Elf32_Addr sh_addr;
101 __ext_Elf32_Off sh_offset;
102 __ext_Elf32_Word sh_size;
103 __ext_Elf32_Word sh_link;
104 __ext_Elf32_Word sh_info;
105 __ext_Elf32_Word sh_addralign;
106 __ext_Elf32_Word sh_entsize;
111 __ext_Elf64_Word sh_name;
112 __ext_Elf64_Word sh_type;
113 __ext_Elf64_Xword sh_flags;
114 __ext_Elf64_Addr sh_addr;
115 __ext_Elf64_Off sh_offset;
116 __ext_Elf64_Xword sh_size;
117 __ext_Elf64_Word sh_link;
118 __ext_Elf64_Word sh_info;
119 __ext_Elf64_Xword sh_addralign;
120 __ext_Elf64_Xword sh_entsize;
122 #endif /* __LIBELF64 */
128 __ext_Elf32_Word st_name;
129 __ext_Elf32_Addr st_value;
130 __ext_Elf32_Word st_size;
131 unsigned char st_info;
132 unsigned char st_other;
133 __ext_Elf32_Half st_shndx;
138 __ext_Elf64_Word st_name;
139 unsigned char st_info;
140 unsigned char st_other;
141 __ext_Elf64_Half st_shndx;
142 __ext_Elf64_Addr st_value;
143 __ext_Elf64_Xword st_size;
145 #endif /* __LIBELF64 */
151 __ext_Elf32_Addr r_offset;
152 __ext_Elf32_Word r_info;
156 __ext_Elf32_Addr r_offset;
157 __ext_Elf32_Word r_info;
158 __ext_Elf32_Sword r_addend;
163 __ext_Elf64_Addr r_offset;
165 __ext_Elf64_Word r_sym;
166 unsigned char r_ssym;
167 unsigned char r_type3;
168 unsigned char r_type2;
169 unsigned char r_type;
170 #else /* __LIBELF64_IRIX */
171 __ext_Elf64_Xword r_info;
172 #endif /* __LIBELF64_IRIX */
176 __ext_Elf64_Addr r_offset;
178 __ext_Elf64_Word r_sym;
179 unsigned char r_ssym;
180 unsigned char r_type3;
181 unsigned char r_type2;
182 unsigned char r_type;
183 #else /* __LIBELF64_IRIX */
184 __ext_Elf64_Xword r_info;
185 #endif /* __LIBELF64_IRIX */
186 __ext_Elf64_Sxword r_addend;
188 #endif /* __LIBELF64 */
194 __ext_Elf32_Word p_type;
195 __ext_Elf32_Off p_offset;
196 __ext_Elf32_Addr p_vaddr;
197 __ext_Elf32_Addr p_paddr;
198 __ext_Elf32_Word p_filesz;
199 __ext_Elf32_Word p_memsz;
200 __ext_Elf32_Word p_flags;
201 __ext_Elf32_Word p_align;
206 __ext_Elf64_Word p_type;
207 __ext_Elf64_Word p_flags;
208 __ext_Elf64_Off p_offset;
209 __ext_Elf64_Addr p_vaddr;
210 __ext_Elf64_Addr p_paddr;
211 __ext_Elf64_Xword p_filesz;
212 __ext_Elf64_Xword p_memsz;
213 __ext_Elf64_Xword p_align;
215 #endif /* __LIBELF64 */
221 __ext_Elf32_Sword d_tag;
223 __ext_Elf32_Word d_val;
224 __ext_Elf32_Addr d_ptr;
230 __ext_Elf64_Sxword d_tag;
232 __ext_Elf64_Xword d_val;
233 __ext_Elf64_Addr d_ptr;
236 #endif /* __LIBELF64 */
239 * Version definitions
242 __ext_Elf32_Half vd_version;
243 __ext_Elf32_Half vd_flags;
244 __ext_Elf32_Half vd_ndx;
245 __ext_Elf32_Half vd_cnt;
246 __ext_Elf32_Word vd_hash;
247 __ext_Elf32_Word vd_aux;
248 __ext_Elf32_Word vd_next;
249 } __ext_Elf32_Verdef;
252 __ext_Elf32_Word vda_name;
253 __ext_Elf32_Word vda_next;
254 } __ext_Elf32_Verdaux;
257 __ext_Elf32_Half vn_version;
258 __ext_Elf32_Half vn_cnt;
259 __ext_Elf32_Word vn_file;
260 __ext_Elf32_Word vn_aux;
261 __ext_Elf32_Word vn_next;
262 } __ext_Elf32_Verneed;
265 __ext_Elf32_Word vna_hash;
266 __ext_Elf32_Half vna_flags;
267 __ext_Elf32_Half vna_other;
268 __ext_Elf32_Word vna_name;
269 __ext_Elf32_Word vna_next;
270 } __ext_Elf32_Vernaux;
275 __ext_Elf64_Half vd_version;
276 __ext_Elf64_Half vd_flags;
277 __ext_Elf64_Half vd_ndx;
278 __ext_Elf64_Half vd_cnt;
279 __ext_Elf64_Word vd_hash;
280 __ext_Elf64_Word vd_aux;
281 __ext_Elf64_Word vd_next;
282 } __ext_Elf64_Verdef;
285 __ext_Elf64_Word vda_name;
286 __ext_Elf64_Word vda_next;
287 } __ext_Elf64_Verdaux;
290 __ext_Elf64_Half vn_version;
291 __ext_Elf64_Half vn_cnt;
292 __ext_Elf64_Word vn_file;
293 __ext_Elf64_Word vn_aux;
294 __ext_Elf64_Word vn_next;
295 } __ext_Elf64_Verneed;
298 __ext_Elf64_Word vna_hash;
299 __ext_Elf64_Half vna_flags;
300 __ext_Elf64_Half vna_other;
301 __ext_Elf64_Word vna_name;
302 __ext_Elf64_Word vna_next;
303 } __ext_Elf64_Vernaux;
305 #endif /* __LIBELF64 */
313 __ext_Elf32_Lword m_value;
314 __ext_Elf32_Word m_info;
315 __ext_Elf32_Word m_poffset;
316 __ext_Elf32_Half m_repeat;
317 __ext_Elf32_Half m_stride;
321 __ext_Elf64_Lword m_value;
322 __ext_Elf64_Xword m_info;
323 __ext_Elf64_Xword m_poffset;
324 __ext_Elf64_Half m_repeat;
325 __ext_Elf64_Half m_stride;
328 #endif /* __LIBELF64 */
332 #endif /* __cplusplus */
334 #endif /* _EXT_TYPES_H */