1 // elfcpp_internal.h -- internals for elfcpp -*- C++ -*-
3 // This is included by elfcpp.h, the external interface, but holds
4 // information which we want to keep private.
6 #include "elfcpp_config.h"
8 #ifndef ELFCPP_INTERNAL_H
9 #define ELFCPP_INTERNAL_H
17 // The ELF file header.
22 unsigned char e_ident
[EI_NIDENT
];
26 typename Elf_types
<size
>::Elf_Addr e_entry
;
27 typename Elf_types
<size
>::Elf_Off e_phoff
;
28 typename Elf_types
<size
>::Elf_Off e_shoff
;
38 // An ELF section header.
45 typename Elf_types
<size
>::Elf_WXword sh_flags
;
46 typename Elf_types
<size
>::Elf_Addr sh_addr
;
47 typename Elf_types
<size
>::Elf_Off sh_offset
;
48 typename Elf_types
<size
>::Elf_WXword sh_size
;
51 typename Elf_types
<size
>::Elf_WXword sh_addralign
;
52 typename Elf_types
<size
>::Elf_WXword sh_entsize
;
55 // An ELF segment header. We use template specialization for the
56 // 32-bit and 64-bit versions because the fields are in a different
66 Elf_types
<32>::Elf_Off p_offset
;
67 Elf_types
<32>::Elf_Addr p_vaddr
;
68 Elf_types
<32>::Elf_Addr p_paddr
;
80 Elf_types
<64>::Elf_Off p_offset
;
81 Elf_types
<64>::Elf_Addr p_vaddr
;
82 Elf_types
<64>::Elf_Addr p_paddr
;
88 // An ELF symbol table entry. We use template specialization for the
89 // 32-bit and 64-bit versions because the fields are in a different
99 Elf_types
<32>::Elf_Addr st_value
;
101 unsigned char st_info
;
102 unsigned char st_other
;
110 unsigned char st_info
;
111 unsigned char st_other
;
113 Elf_types
<64>::Elf_Addr st_value
;
117 // ELF relocation table entries.
122 typename Elf_types
<size
>::Elf_Addr r_offset
;
123 typename Elf_types
<size
>::Elf_WXword r_info
;
129 typename Elf_types
<size
>::Elf_Addr r_offset
;
130 typename Elf_types
<size
>::Elf_WXword r_info
;
131 typename Elf_types
<size
>::Elf_Swxword r_addend
;
134 // An entry in the ELF SHT_DYNAMIC section aka PT_DYNAMIC segment.
139 typename Elf_types
<size
>::Elf_Swxword d_tag
;
140 typename Elf_types
<size
>::Elf_WXword d_val
;
143 // An entry in a SHT_GNU_verdef section. This structure is the same
144 // in 32-bit and 64-bit ELF files.
148 // Version number of structure (VER_DEF_*).
150 // Bit flags (VER_FLG_*).
154 // Number of auxiliary Verdaux entries.
158 // Byte offset to first Verdaux entry.
160 // Byte offset to next Verdef entry.
164 // An auxiliary entry in a SHT_GNU_verdef section. This structure is
165 // the same in 32-bit and 64-bit ELF files.
169 // Offset in string table of version name.
171 // Byte offset to next Verdaux entry.
175 // An entry in a SHT_GNU_verneed section. This structure is the same
176 // in 32-bit and 64-bit ELF files.
180 // Version number of structure (VER_NEED_*).
182 // Number of auxiliary Vernaux entries.
184 // Offset in string table of library name.
186 // Byte offset to first Vernaux entry.
188 // Byt eoffset to next Verneed entry.
192 // An auxiliary entry in a SHT_GNU_verneed section. This structure is
193 // the same in 32-bit and 64-bit ELF files.
197 // Hash of dependency name.
199 // Bit flags (VER_FLG_*).
201 // Version index used in SHT_GNU_versym entries.
203 // Offset in string table of version name.
205 // Byte offset to next Vernaux entry.
209 } // End namespace internal.
211 } // End namespace elfcpp.
213 #endif // !defined(ELFCPP_INTERNAL_H)