add some utils
[libelf-compat.git] / src / exttypes.h
blob8cb2aaecd52e7f59ae452d19765a55d5a8b6c854
1 /* External ELF types.
2 Copyright (C) 1998-2010 Red Hat, Inc.
3 This file is part of elfutils.
4 Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
6 This file is free software; you can redistribute it and/or modify
7 it under the terms of either
9 * the GNU Lesser General Public License as published by the Free
10 Software Foundation; either version 3 of the License, or (at
11 your option) any later version
15 * the GNU General Public License as published by the Free
16 Software Foundation; either version 2 of the License, or (at
17 your option) any later version
19 or both in parallel, as here.
21 elfutils is distributed in the hope that it will be useful, but
22 WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 General Public License for more details.
26 You should have received copies of the GNU General Public License and
27 the GNU Lesser General Public License along with this program. If
28 not, see <http://www.gnu.org/licenses/>. */
30 #ifndef _EXTTYPES_H
31 #define _EXTTYPES_H 1
33 /* Integral types. */
34 typedef char Elf32_Ext_Addr[ELF32_FSZ_ADDR];
35 typedef char Elf32_Ext_Off[ELF32_FSZ_OFF];
36 typedef char Elf32_Ext_Half[ELF32_FSZ_HALF];
37 typedef char Elf32_Ext_Sword[ELF32_FSZ_SWORD];
38 typedef char Elf32_Ext_Word[ELF32_FSZ_WORD];
39 typedef char Elf32_Ext_Sxword[ELF32_FSZ_SXWORD];
40 typedef char Elf32_Ext_Xword[ELF32_FSZ_XWORD];
42 typedef char Elf64_Ext_Addr[ELF64_FSZ_ADDR];
43 typedef char Elf64_Ext_Off[ELF64_FSZ_OFF];
44 typedef char Elf64_Ext_Half[ELF64_FSZ_HALF];
45 typedef char Elf64_Ext_Sword[ELF64_FSZ_SWORD];
46 typedef char Elf64_Ext_Word[ELF64_FSZ_WORD];
47 typedef char Elf64_Ext_Sxword[ELF64_FSZ_SXWORD];
48 typedef char Elf64_Ext_Xword[ELF64_FSZ_XWORD];
51 /* Define the composed types. */
52 #define START(Bits, Name, EName) typedef struct {
53 #define END(Bits, Name) } ElfW2(Bits, Name)
54 #define TYPE_NAME(Type, Name) Type Name;
55 #define TYPE_EXTRA(Text) Text
56 #define TYPE_XLATE(Text)
58 /* Get the abstract definitions. */
59 #include "abstract.h"
61 /* And define the types. */
62 Ehdr32 (Ext_);
63 Phdr32 (Ext_);
64 Shdr32 (Ext_);
65 Sym32 (Ext_);
66 Rel32 (Ext_);
67 Rela32 (Ext_);
68 Note32 (Ext_);
69 Dyn32 (Ext_);
70 Verdef32 (Ext_);
71 Verdaux32 (Ext_);
72 Verneed32 (Ext_);
73 Vernaux32 (Ext_);
74 Syminfo32 (Ext_);
75 Move32 (Ext_);
76 Lib32 (Ext_);
77 auxv_t32 (Ext_);
79 Ehdr64 (Ext_);
80 Phdr64 (Ext_);
81 Shdr64 (Ext_);
82 Sym64 (Ext_);
83 Rel64 (Ext_);
84 Rela64 (Ext_);
85 Note64 (Ext_);
86 Dyn64 (Ext_);
87 Verdef64 (Ext_);
88 Verdaux64 (Ext_);
89 Verneed64 (Ext_);
90 Vernaux64 (Ext_);
91 Syminfo64 (Ext_);
92 Move64 (Ext_);
93 Lib64 (Ext_);
94 auxv_t64 (Ext_);
96 #undef START
97 #undef END
98 #undef TYPE_NAME
99 #undef TYPE_EXTRA
100 #undef TYPE_XLATE
102 #endif /* exttypes.h */