24 void SetupOptions(std::shared_ptr<Linker::OutputFormat> format)
override;
32 EndianType endiantype = ::LittleEndian;
38 bool option_16bit =
true;
39 bool option_linear =
false;
54 uint32_t name_offset = 0;
56 offset_t value = 0, size = 0;
57 uint8_t bind = 0, type = 0, other = 0;
61 bool unallocated =
false;
69 uint32_t name_offset = 0;
71 uint32_t type = 0, link = 0, info = 0;
73 offset_t address = 0, file_offset = 0, size = 0, align = 0, entsize = 0;
74 std::shared_ptr<Linker::Section> section;
75 std::vector<Symbol> symbols;
77 std::vector<Section> sections;
86 uint16_t sh_link = 0, sh_info = 0;
87 bool addend_from_section_data =
false;
89 std::vector<Relocation> relocations;
91 static const uint8_t ELFCLASS32 = 1;
92 static const uint8_t ELFCLASS64 = 2;
93 static const uint8_t ELFDATA2LSB = 1;
94 static const uint8_t ELFDATA2MSB = 2;
96 static const uint16_t EM_386 = 3;
97 static const uint16_t EM_68K = 4;
98 static const uint16_t EM_ARM = 40;
100 static const uint32_t SHT_PROGBITS = 1;
101 static const uint32_t SHT_SYMTAB = 2;
102 static const uint32_t SHT_STRTAB = 3;
103 static const uint32_t SHT_RELA = 4;
104 static const uint32_t SHT_NOBITS = 8;
105 static const uint32_t SHT_REL = 9;
106 static const uint32_t SHT_GROUP = 10;
108 static const offset_t SHF_WRITE = 0x0001;
109 static const offset_t SHF_ALLOC = 0x0002;
110 static const offset_t SHF_EXECINSTR = 0x0004;
111 static const offset_t SHF_MERGE = 0x0010;
112 static const offset_t SHF_GROUP = 0x0200;
114 static const uint16_t SHN_UNDEF = 0;
115 static const uint16_t SHN_ABS = 0xFFF1;
116 static const uint16_t SHN_COMMON = 0xFFF2;
117 static const uint16_t SHN_XINDEX = 0xFFFF;
119 static const uint8_t STB_LOCAL = 0;
120 static const uint8_t STB_GLOBAL = 1;
122 static const offset_t R_386_8 = 22;
123 static const offset_t R_386_PC8 = 23;
124 static const offset_t R_386_16 = 20;
125 static const offset_t R_386_PC16 = 21;
126 static const offset_t R_386_32 = 1;
127 static const offset_t R_386_PC32 = 2;
129 static const offset_t R_386_SEG16 = 45;
130 static const offset_t R_386_SUB16 = 46;
131 static const offset_t R_386_SUB32 = 47;
132 static const offset_t R_386_SEGRELATIVE = 48;
133 static const offset_t R_386_OZSEG16 = 80;
134 static const offset_t R_386_OZRELSEG16 = 81;
136 static const offset_t R_68K_8 = 3;
137 static const offset_t R_68K_PC8 = 6;
138 static const offset_t R_68K_16 = 2;
139 static const offset_t R_68K_PC16 = 5;
140 static const offset_t R_68K_32 = 1;
141 static const offset_t R_68K_PC32 = 4;
143 static const offset_t R_ARM_ABS8 = 8;
144 static const offset_t R_ARM_ABS16 = 16;
145 static const offset_t R_ARM_ABS32 = 2;
146 static const offset_t R_ARM_REL32 = 3;
147 static const offset_t R_ARM_CALL = 28;
148 static const offset_t R_ARM_JUMP24 = 29;
149 static const offset_t R_ARM_PC24 = 1;
150 static const offset_t R_ARM_V4BX = 40;