27 static constexpr uint8_t EI_OSABI = 7;
28 static constexpr uint8_t EI_ABIVERSION = 8;
29 static constexpr uint8_t EI_CLASS = 4;
30 static constexpr uint8_t EI_DATA = 5;
32 static constexpr uint8_t ELFCLASSNONE = 0;
33 static constexpr uint8_t ELFCLASS32 = 1;
34 static constexpr uint8_t ELFCLASS64 = 2;
36 static constexpr uint8_t ELFDATANONE = 0;
37 static constexpr uint8_t ELFDATA2LSB = 1;
38 static constexpr uint8_t ELFDATA2MSB = 2;
40 static constexpr uint8_t EV_NONE = 0;
41 static constexpr uint8_t EV_CURRENT = 1;
43 static constexpr uint8_t ELFOSABI_NONE = 0;
45 static constexpr offset_t SHF_WRITE = 0x0001;
46 static constexpr offset_t SHF_ALLOC = 0x0002;
47 static constexpr offset_t SHF_EXECINSTR = 0x0004;
48 static constexpr offset_t SHF_MERGE = 0x0010;
49 static constexpr offset_t SHF_STRINGS = 0x0020;
50 static constexpr offset_t SHF_INFO_LINK = 0x0040;
51 static constexpr offset_t SHF_LINK_ORDER = 0x0080;
52 static constexpr offset_t SHF_OS_NONCONFORMING = 0x0100;
53 static constexpr offset_t SHF_GROUP = 0x0200;
54 static constexpr offset_t SHF_TLS = 0x0400;
55 static constexpr offset_t SHF_COMPRESSED = 0x0800;
57 static constexpr offset_t SHF_GNU_RETAIN = 0x00200000;
58 static constexpr offset_t SHF_GNU_MBIND = 0x01000000;
59 static constexpr offset_t SHF_EXCLUDE = 0x80000000;
61 static constexpr offset_t SHF_BEGIN = 0x01000000;
62 static constexpr offset_t SHF_END = 0x02000000;
64 static constexpr uint16_t SHN_UNDEF = 0;
65 static constexpr uint16_t SHN_LORESERVE = 0xFF00;
66 static constexpr uint16_t SHN_ABS = 0xFFF1;
67 static constexpr uint16_t SHN_COMMON = 0xFFF2;
68 static constexpr uint16_t SHN_XINDEX = 0xFFFF;
70 static constexpr uint8_t STB_LOCAL = 0;
71 static constexpr uint8_t STB_GLOBAL = 1;
72 static constexpr uint8_t STB_WEAK = 2;
73 static constexpr uint8_t STB_ENTRY = 12;
75 static constexpr uint8_t STT_NOTYPE = 0;
76 static constexpr uint8_t STT_OBJECT = 1;
77 static constexpr uint8_t STT_FUNC = 2;
78 static constexpr uint8_t STT_SECTION = 3;
79 static constexpr uint8_t STT_FILE = 4;
80 static constexpr uint8_t STT_COMMON = 5;
81 static constexpr uint8_t STT_TLS = 6;
82 static constexpr uint8_t STT_IMPORT = 11;
84 static constexpr uint8_t STV_DEFAULT = 0;
85 static constexpr uint8_t STV_INTERNAL = 1;
86 static constexpr uint8_t STV_HIDDEN = 2;
87 static constexpr uint8_t STV_PROTECTED = 3;
89 static constexpr offset_t R_386_8 = 22;
90 static constexpr offset_t R_386_PC8 = 23;
91 static constexpr offset_t R_386_16 = 20;
92 static constexpr offset_t R_386_PC16 = 21;
93 static constexpr offset_t R_386_32 = 1;
94 static constexpr offset_t R_386_PC32 = 2;
95 static constexpr offset_t R_386_GOT32 = 3;
96 static constexpr offset_t R_386_GOTPC = 10;
97 static constexpr offset_t R_386_GOTOFF = 9;
98 static constexpr offset_t R_386_PLT32 = 4;
112 static constexpr offset_t R_X86_64_8 = 14;
113 static constexpr offset_t R_X86_64_PC8 = 15;
114 static constexpr offset_t R_X86_64_16 = 12;
115 static constexpr offset_t R_X86_64_PC16 = 13;
116 static constexpr offset_t R_X86_64_32 = 10;
117 static constexpr offset_t R_X86_64_32S = 11;
118 static constexpr offset_t R_X86_64_PC32 = 2;
119 static constexpr offset_t R_X86_64_PLT32 = 4;
120 static constexpr offset_t R_X86_64_64 = 1;
121 static constexpr offset_t R_X86_64_PC64 = 24;
123 static constexpr offset_t R_68K_8 = 3;
124 static constexpr offset_t R_68K_PC8 = 6;
125 static constexpr offset_t R_68K_16 = 2;
126 static constexpr offset_t R_68K_PC16 = 5;
127 static constexpr offset_t R_68K_32 = 1;
128 static constexpr offset_t R_68K_PC32 = 4;
129 static constexpr offset_t R_68K_GOT8 = 9;
130 static constexpr offset_t R_68K_GOT8O = 12;
131 static constexpr offset_t R_68K_GOT16 = 8;
132 static constexpr offset_t R_68K_GOT16O = 11;
133 static constexpr offset_t R_68K_GOT32 = 7;
134 static constexpr offset_t R_68K_GOT32O = 10;
135 static constexpr offset_t R_68K_PLT8 = 15;
136 static constexpr offset_t R_68K_PLT8O = 18;
137 static constexpr offset_t R_68K_PLT16 = 14;
138 static constexpr offset_t R_68K_PLT16O = 17;
139 static constexpr offset_t R_68K_PLT32 = 13;
140 static constexpr offset_t R_68K_PLT32O = 16;
142 static constexpr offset_t R_ARM_ABS8 = 8;
143 static constexpr offset_t R_ARM_ABS16 = 16;
144 static constexpr offset_t R_ARM_ABS32 = 2;
145 static constexpr offset_t R_ARM_REL32 = 3;
146 static constexpr offset_t R_ARM_CALL = 28;
147 static constexpr offset_t R_ARM_JUMP24 = 29;
148 static constexpr offset_t R_ARM_PC24 = 1;
149 static constexpr offset_t R_ARM_V4BX = 40;
151 static constexpr offset_t R_PPC_ADDR14 = 7;
152 static constexpr offset_t R_PPC_ADDR14_BRTAKEN = 8;
153 static constexpr offset_t R_PPC_ADDR14_BRNTAKEN = 9;
154 static constexpr offset_t R_PPC_REL14 = 11;
155 static constexpr offset_t R_PPC_REL14_BRTAKEN = 12;
156 static constexpr offset_t R_PPC_REL14_BRNTAKEN = 13;
157 static constexpr offset_t R_PPC_ADDR16 = 3;
158 static constexpr offset_t R_PPC_UADDR16 = 25;
159 static constexpr offset_t R_PPC_ADDR16_LO = 4;
160 static constexpr offset_t R_PPC_ADDR16_HI = 5;
161 static constexpr offset_t R_PPC_ADDR16_HA = 6;
162 static constexpr offset_t R_PPC_ADDR24 = 2;
163 static constexpr offset_t R_PPC_REL24 = 10;
164 static constexpr offset_t R_PPC_ADDR30 = 37;
165 static constexpr offset_t R_PPC_ADDR32 = 1;
166 static constexpr offset_t R_PPC_UADDR32 = 24;
167 static constexpr offset_t R_PPC_REL32 = 26;
168 static constexpr offset_t R_PPC64_ADDR64 = 38;
169 static constexpr offset_t R_PPC64_UADDR64 = 43;
170 static constexpr offset_t R_PPC64_REL64 = 44;
173 static constexpr offset_t R_VAX_8 = 3;
174 static constexpr offset_t R_VAX_PC8 = 6;
175 static constexpr offset_t R_VAX_16 = 2;
176 static constexpr offset_t R_VAX_PC16 = 5;
177 static constexpr offset_t R_VAX_32 = 1;
178 static constexpr offset_t R_VAX_PC32 = 4;
179 static constexpr offset_t R_VAX_GOT32 = 7;
180 static constexpr offset_t R_VAX_PLT32 = 13;
182 static constexpr offset_t R_Z80_8 = 1;
183 static constexpr offset_t R_Z80_8_DIS = 2;
184 static constexpr offset_t R_Z80_8_PCREL = 3;
185 static constexpr offset_t R_Z80_16 = 4;
186 static constexpr offset_t R_Z80_24 = 5;
187 static constexpr offset_t R_Z80_32 = 6;
189 static constexpr offset_t DT_NULL = 0;
190 static constexpr offset_t DT_NEEDED = 1;
191 static constexpr offset_t DT_PLTRELSZ = 2;
192 static constexpr offset_t DT_PLTGOT = 3;
193 static constexpr offset_t DT_HASH = 4;
194 static constexpr offset_t DT_STRTAB = 5;
195 static constexpr offset_t DT_SYMTAB = 6;
196 static constexpr offset_t DT_RELA = 7;
197 static constexpr offset_t DT_RELASZ = 8;
198 static constexpr offset_t DT_RELAENT = 9;
199 static constexpr offset_t DT_STRSZ = 10;
200 static constexpr offset_t DT_SYMENT = 11;
201 static constexpr offset_t DT_INIT = 12;
202 static constexpr offset_t DT_FINI = 13;
203 static constexpr offset_t DT_SONAME = 14;
204 static constexpr offset_t DT_RPATH = 15;
205 static constexpr offset_t DT_SYMBOLIC = 16;
206 static constexpr offset_t DT_REL = 17;
207 static constexpr offset_t DT_RELSZ = 18;
208 static constexpr offset_t DT_RELENT = 19;
209 static constexpr offset_t DT_PLTREL = 20;
210 static constexpr offset_t DT_DEBUG = 21;
211 static constexpr offset_t DT_TEXTREL = 22;
212 static constexpr offset_t DT_JMPREL = 23;
213 static constexpr offset_t DT_BIND_NOW = 24;
214 static constexpr offset_t DT_INIT_ARRAY = 25;
215 static constexpr offset_t DT_FINI_ARRAY = 26;
216 static constexpr offset_t DT_INIT_ARRAYSZ = 27;
217 static constexpr offset_t DT_FINI_ARRAYSZ = 28;
218 static constexpr offset_t DT_RUNPATH = 29;
219 static constexpr offset_t DT_FLAGS = 30;
220 static constexpr offset_t DT_ENCODING = 31;
221 static constexpr offset_t DT_PREINIT_ARRAY = 32;
222 static constexpr offset_t DT_PREINIT_ARRAYSZ = 33;
223 static constexpr offset_t DT_SYMTAB_SHNDX = 34;
224 static constexpr offset_t DT_RELRSZ = 35;
225 static constexpr offset_t DT_RELR = 36;
226 static constexpr offset_t DT_RELRENT = 37;
228 static constexpr offset_t DT_EXPORT = 0x60000001;
229 static constexpr offset_t DT_EXPORTSZ = 0x60000002;
230 static constexpr offset_t DT_EXPENT = 0x60000003;
231 static constexpr offset_t DT_IMPORT = 0x60000004;
232 static constexpr offset_t DT_IMPORTSZ = 0x60000005;
233 static constexpr offset_t DT_IMPENT = 0x60000006;
234 static constexpr offset_t DT_IT = 0x60000007;
235 static constexpr offset_t DT_ITPRTY = 0x60000008;
236 static constexpr offset_t DT_INITTERM = 0x60000009;
237 static constexpr offset_t DT_STACKSZ = 0x6000000A;
239 static constexpr offset_t DT_GNU_FLAGS1 = 0x6FFFFDF4;
240 static constexpr offset_t DT_GNU_PRELINKED = 0x6FFFFDF5;
241 static constexpr offset_t DT_GNU_CONFLICTSZ = 0x6FFFFDF6;
242 static constexpr offset_t DT_GNU_LIBLISTSZ = 0x6FFFFDF7;
243 static constexpr offset_t DT_CHECKSUM = 0x6FFFFDF8;
244 static constexpr offset_t DT_PLTPADSZ = 0x6FFFFDF9;
245 static constexpr offset_t DT_MOVEENT = 0x6FFFFDFA;
246 static constexpr offset_t DT_MOVESZ = 0x6FFFFDFB;
247 static constexpr offset_t DT_FEATURE = 0x6FFFFDFC;
248 static constexpr offset_t DT_POSTFLAG_1 = 0x6FFFFDFD;
249 static constexpr offset_t DT_SYMINSZ = 0x6FFFFDFE;
250 static constexpr offset_t DT_SYMINENT = 0x6FFFFDFF;
251 static constexpr offset_t DT_GNU_HASH = 0x6FFFFEF5;
252 static constexpr offset_t DT_TLSDESC_PLT = 0x6FFFFEF6;
253 static constexpr offset_t DT_TLSDESC_GOT = 0x6FFFFEF7;
254 static constexpr offset_t DT_GNU_CONFLICT = 0x6FFFFFEF8;
255 static constexpr offset_t DT_GNU_LIBLIST = 0x6FFFFEF9;
256 static constexpr offset_t DT_CONFIG = 0x6FFFFEFA;
257 static constexpr offset_t DT_DEPAUDIT = 0x6FFFFEFB;
258 static constexpr offset_t DT_AUDIT = 0x6FFFFEFC;
259 static constexpr offset_t DT_PLTPAD = 0x6FFFFEFD;
260 static constexpr offset_t DT_MOVETAB = 0x6FFFFEFE;
261 static constexpr offset_t DT_SYMINFO = 0x6FFFFEFF;
262 static constexpr offset_t DT_VERSYM = 0x6FFFFFF0;
263 static constexpr offset_t DT_RELACOUNT = 0x6FFFFFF9;
264 static constexpr offset_t DT_RELCOUNT = 0x6FFFFFFA;
265 static constexpr offset_t DT_FLAGS_1 = 0x6FFFFFFB;
266 static constexpr offset_t DT_VERDEF = 0x6FFFFFFC;
267 static constexpr offset_t DT_VERDEFNUM = 0x6FFFFFFD;
268 static constexpr offset_t DT_VERNEED = 0x6FFFFFFE;
269 static constexpr offset_t DT_VERNEEDNUM = 0x6FFFFFFF;
270 static constexpr offset_t DT_AUXILIARY = 0x7FFFFFFD;
271 static constexpr offset_t DT_USED = 0x7FFFFFFE;
272 static constexpr offset_t DT_FILTER = 0x7FFFFFFFF;
274 offset_t file_offset = 0;
276 uint8_t file_class = 0;
277 EndianType endiantype = ::LittleEndian;
279 uint8_t data_encoding = 0;
280 size_t wordbytes = 4;
366 EM_ARC_A5 = EM_ARC_COMPACT,
388 EM_ALTERA_NIOS32 = 113,
405 EM_LATTICEMICO32 = 138,
414 EM_CYPRESS_M8C = 161,
422 EM_ECOG1X = EM_ECOG1,
429 EM_MCST_ELBRUS = 175,
446 EM_CLOUDSHIELD = 192,
449 EM_ARC_COMPACT2 = 195,
473 EM_CSR_KALIMBA = 219,
486 EM_GRAPHCORE_IPU = 248,
491 EM_ARC_COMPACT3_64 = 253,
493 EM_ARC_COMPACT3 = 255,
508 cpu_type cpu = EM_NONE;
510 uint8_t header_version = 0;
512 uint8_t abi_version = 0;
522 file_type object_file_type = ET_NONE;
523 uint16_t file_version = 0;
526 offset_t program_header_offset = 0;
527 offset_t section_header_offset = 0;
529 uint16_t elf_header_size = 0;
530 uint16_t program_header_entry_size = 0;
531 uint16_t section_header_entry_size = 0;
532 uint32_t section_name_string_table = 0;
537 virtual void AddDumperFields(std::unique_ptr<Dumper::Region>& region,
Dumper::Dumper& dump,
const ELFFormat& fmt,
unsigned index)
const;
544 uint32_t name_offset = 0;
546 offset_t value = 0, size = 0;
547 uint8_t bind = 0, type = 0, other = 0;
549 uint32_t sh_link = 0;
550 bool defined =
false;
551 bool unallocated =
false;
562 std::vector<Symbol> symbols;
565 : wordbytes(wordbytes), entsize(entsize)
580 std::vector<std::string> strings;
598 std::vector<offset_t> array;
600 Array(offset_t entsize)
625 void AddDumperFields(std::unique_ptr<Dumper::Region>& region,
Dumper::Dumper& dump,
const ELFFormat& fmt,
unsigned index)
const override;
646 uint32_t sh_link = 0, sh_info = 0;
647 bool addend_from_section_data =
false;
649 size_t GetSize(cpu_type cpu)
const;
650 std::string GetName(cpu_type cpu)
const;
659 std::vector<Relocation> relocations;
662 : wordbytes(wordbytes), entsize(entsize)
675 std::vector<uint32_t> buckets;
676 std::vector<uint32_t> chains;
678 static uint32_t Hash(
const std::string& name);
684 void AddDumperFields(std::unique_ptr<Dumper::Region>& region,
Dumper::Dumper& dump,
const ELFFormat& fmt,
unsigned index)
const override;
700 : tag(tag), value(value)
711 std::vector<DynamicObject> dynamic;
714 : wordbytes(wordbytes), entsize(entsize)
728 std::string descriptor;
738 std::vector<Note> notes;
760 uint32_t name_offset = 0;
762 uint32_t offset_next_entry = 0;
765 uint16_t version = 0;
766 uint32_t file_name_offset = 0;
767 std::string file_name;
768 uint32_t offset_auxiliary_array = 0;
769 std::vector<Auxiliary> auxiliary_array;
770 uint32_t offset_next_entry = 0;
776 std::vector<VersionRequirement> requirements;
788 enum system_type : uint32_t
796 system_type os_type = EOS_NONE;
797 uint32_t os_size = 0;
798 bool IsOS2Specific()
const;
802 enum os2_session : uint8_t
809 os2_session sessiontype = OS2_SES_NONE;
810 uint8_t sessionflags;
813 std::vector<uint8_t> os_specific;
818 void AddDumperFields(std::unique_ptr<Dumper::Region>& region,
Dumper::Dumper& dump,
const ELFFormat& fmt,
unsigned index)
const override;
825 uint32_t ordinal = 0, name_offset = 0;
833 import_type type = IMP_IGNORED;
835 std::string dll_name;
843 std::vector<IBMImportEntry> imports;
860 uint32_t ordinal = 0, symbol_index = 0, name_offset = 0;
862 uint32_t sh_link = 0, sh_info = 0;
870 std::vector<IBMExportEntry> exports;
888 uint32_t ordinal = 0;
889 uint32_t name_offset = 0;
891 uint32_t data_offset = 0;
892 uint32_t data_size = 0;
893 std::shared_ptr<Linker::Contents> data;
907 uint16_t version = 0;
909 uint32_t name_offset = 0;
911 uint32_t item_array_offset = 0;
912 uint32_t item_array_entry_size = 0;
913 uint32_t header_size = 0;
914 uint32_t string_table_offset = 0;
915 uint32_t locale_offset = 0;
917 char16_t country[2] = { };
918 char16_t language[2] = { };
920 std::vector<IBMResource> resources;
926 void AddDumperFields(std::unique_ptr<Dumper::Region>& region,
Dumper::Dumper& dump,
const ELFFormat& fmt,
unsigned index)
const override;
931 class IBMResourceFile
934 uint8_t file_class = 0;
935 EndianType endiantype = ::LittleEndian;
937 uint8_t data_encoding = 0;
938 size_t wordbytes = 4;
942 uint32_t header_size = 0;
943 uint32_t resource_collection_offset = 0;
944 std::vector<IBMResourceCollection> resource_collections;
951 uint32_t name_offset = 0;
969 SHT_PREINIT_ARRAY = 16,
971 SHT_SYMTAB_SHNDX = 18,
974 SHT_IMPORTS = 0x60000002,
975 SHT_EXPORTS = 0x60000003,
976 SHT_RES = 0x60000004,
979 SHT_OLD_IMPORTS = 13,
980 SHT_OLD_EXPORTS = 14,
984 SHT_GNU_INCREMENTAL_INPUTS = 0x6FFF4700,
985 SHT_GNU_ATTRIBUTES = 0x6FFFFFF5,
986 SHT_GNU_HASH = 0x6FFFFFF6,
987 SHT_GNU_LIBLIST = 0x6FFFFFF7,
988 SHT_SUNW_verdef = 0x6FFFFFFD,
989 SHT_SUNW_verneed = 0x6FFFFFFE,
990 SHT_SUNW_versym = 0x6FFFFFFF,
992 section_type type = SHT_NULL;
993 uint32_t link = 0, info = 0;
995 offset_t address = 0, file_offset = 0, size = 0, align = 0, entsize = 0;
997 std::shared_ptr<Linker::Contents> contents;
999 std::shared_ptr<Linker::Section> GetSection();
1000 const std::shared_ptr<Linker::Section> GetSection()
const;
1002 std::shared_ptr<SymbolTable> GetSymbolTable();
1003 const std::shared_ptr<SymbolTable> GetSymbolTable()
const;
1006 std::shared_ptr<StringTable> GetStringTable();
1008 std::shared_ptr<Array> GetArray();
1010 std::shared_ptr<Relocations> GetRelocations();
1011 const std::shared_ptr<Relocations> GetRelocations()
const;
1013 std::shared_ptr<DynamicSection> GetDynamicSection();
1016 std::shared_ptr<NotesSection> GetNotesSection();
1018 std::shared_ptr<IBMSystemInfo> GetIBMSystemInfo();
1021 std::shared_ptr<IBMImportTable> GetIBMImportTable();
1022 std::shared_ptr<IBMExportTable> GetIBMExportTable();
1024 bool GetFileSize()
const;
1028 static std::shared_ptr<Linker::Section> ReadProgBits(
Linker::Reader& rd, offset_t file_offset,
const std::string& name, offset_t size);
1029 static std::shared_ptr<Linker::Section> ReadNoBits(
const std::string& name, offset_t size);
1030 static std::shared_ptr<SymbolTable> ReadSymbolTable(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize, uint32_t section_link,
size_t wordbytes);
1031 static std::shared_ptr<Relocations> ReadRelocations(
Linker::Reader& rd, Section::section_type type, offset_t file_offset, offset_t section_size, offset_t entsize, uint32_t section_link, uint32_t section_info,
size_t wordbytes);
1032 static std::shared_ptr<StringTable> ReadStringTable(
Linker::Reader& rd, offset_t file_offset, offset_t section_size);
1033 static std::shared_ptr<Array> ReadArray(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize);
1034 static std::shared_ptr<SectionGroup> ReadSectionGroup(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize);
1035 static std::shared_ptr<IndexArray> ReadIndexArray(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize);
1036 static std::shared_ptr<HashTable> ReadHashTable(
Linker::Reader& rd, offset_t file_offset);
1037 static std::shared_ptr<DynamicSection> ReadDynamic(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize,
size_t wordbytes);
1038 static std::shared_ptr<NotesSection> ReadNote(
Linker::Reader& rd, offset_t file_offset, offset_t section_size);
1039 static std::shared_ptr<VersionRequirements> ReadVersionRequirements(
Linker::Reader& rd, offset_t file_offset, offset_t section_link, offset_t section_info);
1040 static std::shared_ptr<IBMSystemInfo> ReadIBMSystemInfo(
Linker::Reader& rd, offset_t file_offset);
1041 static std::shared_ptr<IBMImportTable> ReadIBMImportTable(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize);
1042 static std::shared_ptr<IBMExportTable> ReadIBMExportTable(
Linker::Reader& rd, offset_t file_offset, offset_t section_size, offset_t entsize);
1043 static std::shared_ptr<IBMResourceCollection> ReadIBMResourceCollection(
Linker::Reader& rd, offset_t file_offset);
1045 std::vector<Section> sections;
1062 PT_RES = 0x60000002,
1067 PT_SUNW_EH_FRAME = 0x6474E550,
1068 PT_GNU_STACK = 0x6474E551,
1069 PT_GNU_RELRO = 0x6474E552,
1070 PT_GNU_PROPERTY = 0x6474E553,
1071 PT_GNU_SFRAME = 0x6474E554,
1072 PT_GNU_MBIND_LO = 0x6474E555,
1073 PT_GNU_MBIND_HI = 0x6474F554,
1074 PT_OPENBSD_MUTABLE = 0x65A3DBE5,
1075 PT_OPENBSD_RANDOMIZE = 0x65A3DBE6,
1076 PT_OPENBSD_WXNEEDED = 0x65A3DBE7,
1077 PT_OPENBSD_NOBTCFI = 0x65A3DBE8,
1078 PT_OPENBSD_BOOTDATA = 0x65A41BE6,
1091 offset_t offset = 0, vaddr = 0, paddr = 0, filesz = 0, memsz = 0, align = 0;
1106 offset_t offset, size;
1107 Part(
part_type type, uint32_t index, offset_t offset, offset_t size)
1108 : type(type), index(index), offset(offset), size(size)
1112 offset_t GetOffset(
const ELFFormat& fmt)
const;
1113 offset_t GetActualSize(
const ELFFormat& fmt)
const;
1116 std::vector<Part> parts;
1118 std::vector<Segment> segments;
1123 offset_t offset = 0;
1125 std::shared_ptr<Linker::Contents> image;
1126 Block(offset_t offset = 0, offset_t size = 0)
1127 : offset(offset), size(size)
1143 offset_t unknown1, offset, size, unknown2;
1144 std::shared_ptr<Linker::Buffer> image;
1146 offset_t hobbit_beos_resource_offset = 0;
1147 std::vector<HobbitBeOSResource> hobbit_beos_resources;
1167 bool option_16bit =
true;
1168 bool option_linear =
false;
1177 bool option_absolute_symbols =
false;
1180 void SetupOptions(std::shared_ptr<Linker::OutputFormat> format)
override;
1188 enum operating_system_type
1196 operating_system_type operating_system = Linux;
1198 offset_t image_base;
1199 offset_t header_size;
1200 bool create_header_segment;
1201 bool include_header_segment;
1202 offset_t segment_align;
1203 offset_t section_align;
1226 static std::vector<Linker::OptionDescription<void> *> ParameterNames;
1228 std::shared_ptr<Linker::OptionCollector>
GetOptions()
override;
1230 void SetOptions(std::map<std::string, std::string>& options)
override;
1231 void OnNewSegment(std::shared_ptr<Linker::Segment> segment)
override;