paludis  Version 2.6.0
elf_types.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2007 Tiziano Müller
5  * Copyright (c) 2007 David Leverton
6  *
7  * This file is part of the Paludis package manager. Paludis is free software;
8  * you can redistribute it and/or modify it under the terms of the GNU General
9  * Public License version 2, as published by the Free Software Foundation.
10  *
11  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18  * Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 #ifndef PALUDIS_GUARD_PALUDIS_UTIL_ELF_TYPES_HH
22 #define PALUDIS_GUARD_PALUDIS_UTIL_ELF_TYPES_HH 1
23 
24 #include <elf.h>
25 
26 namespace paludis
27 {
28  struct Elf32Type
29  {
30  enum {
31  elf_class = ELFCLASS32
32  };
33 
34  typedef Elf32_Ehdr Header;
35  typedef Elf32_Shdr SectionHeader;
36  typedef Elf32_Sym Symbol;
37  typedef Elf32_Dyn DynamicEntry;
38  typedef Elf32_Rel Relocation;
39  typedef Elf32_Rela RelocationA;
40 
41  typedef Elf32_Off Offset;
42  typedef Elf32_Half Half;
43  typedef Elf32_Word Word;
44  typedef Elf32_Addr Address;
45 
46  typedef Elf32_Word DynamicValue;
47  typedef Elf32_Addr DynamicPointer;
48  typedef Elf32_Sword DynamicTag;
49 
50  typedef Elf32_Addr RelocationOffset;
51  typedef Elf32_Word RelocationInfo;
52  typedef Elf32_Sword RelocationAddend;
53 
54  typedef Elf32_Word SectionSize;
55  };
56 
57  struct Elf64Type
58  {
59  enum {
60  elf_class = ELFCLASS64
61  };
62 
63  typedef Elf64_Ehdr Header;
64  typedef Elf64_Shdr SectionHeader;
65  typedef Elf64_Sym Symbol;
66  typedef Elf64_Dyn DynamicEntry;
67  typedef Elf64_Rel Relocation;
68  typedef Elf64_Rela RelocationA;
69 
70  typedef Elf64_Off Offset;
71  typedef Elf64_Half Half;
72  typedef Elf64_Word Word;
73  typedef Elf64_Xword Xword;
74  typedef Elf64_Sxword Sxword;
75  typedef Elf64_Addr Address;
76 
77  typedef Elf64_Xword DynamicValue;
78  typedef Elf64_Addr DynamicPointer;
79  typedef Elf64_Sxword DynamicTag;
80 
81  typedef Elf64_Addr RelocationOffset;
82  typedef Elf64_Xword RelocationInfo;
83  typedef Elf64_Sxword RelocationAddend;
84 
85  typedef Elf64_Xword SectionSize;
86  };
87 }
88 
89 #endif
90 
Definition: about_metadata-fwd.hh:23
Definition: elf_types.hh:28
Definition: elf_types.hh:57