1 /* External ELF types. 2 Copyright (C) 1998-2010, 2015 Red Hat, Inc. 3 This file is part of elfutils. 4 Contributed by Ulrich Drepper <drepper@redhat.com>, 1998. 5 6 This file is free software; you can redistribute it and/or modify 7 it under the terms of either 8 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 12 13 or 14 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 18 19 or both in parallel, as here. 20 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. 25 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/>. */ 29 30 #ifndef _EXTTYPES_H 31 #define _EXTTYPES_H 1 32 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]; 41 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]; 49 50 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) 57 58 /* Get the abstract definitions. */ 59 #include "abstract.h" 60 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_); 78 Chdr32 (Ext_); 79 80 Ehdr64 (Ext_); 81 Phdr64 (Ext_); 82 Shdr64 (Ext_); 83 Sym64 (Ext_); 84 Rel64 (Ext_); 85 Rela64 (Ext_); 86 Note64 (Ext_); 87 Dyn64 (Ext_); 88 Verdef64 (Ext_); 89 Verdaux64 (Ext_); 90 Verneed64 (Ext_); 91 Vernaux64 (Ext_); 92 Syminfo64 (Ext_); 93 Move64 (Ext_); 94 Lib64 (Ext_); 95 auxv_t64 (Ext_); 96 Chdr64 (Ext_); 97 98 #undef START 99 #undef END 100 #undef TYPE_NAME 101 #undef TYPE_EXTRA 102 #undef TYPE_XLATE 103 104 #endif /* exttypes.h */ 105