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 } // End namespace internal.
136 } // End namespace elfcpp.
138 #endif // !defined(ELFCPP_INTERNAL_H)