Home | History | Annotate | Download | only in gold

Lines Matching refs:elfcpp

29 #include "elfcpp.h"
49 Binary_to_elf::Binary_to_elf(elfcpp::EM machine, int size, bool big_endian,
181 const int sym_size = elfcpp::Elf_sizes<size>::sym_size;
183 size_t output_size = (elfcpp::Elf_sizes<size>::ehdr_size
184 + 5 * elfcpp::Elf_sizes<size>::shdr_size);
202 this->write_section_header<size, big_endian>("", &shstrtab, elfcpp::SHT_NULL,
209 elfcpp::SHT_PROGBITS,
210 (elfcpp::SHF_ALLOC
211 | elfcpp::SHF_WRITE),
216 elfcpp::SHT_SYMTAB,
220 elfcpp::SHT_STRTAB,
225 elfcpp::SHT_STRTAB,
244 elfcpp::SHN_ABS, &pout);
268 elfcpp::Ehdr_write<size, big_endian> oehdr(*ppout);
270 unsigned char e_ident[elfcpp::EI_NIDENT];
271 memset(e_ident, 0, elfcpp::EI_NIDENT);
272 e_ident[elfcpp::EI_MAG0] = elfcpp::ELFMAG0;
273 e_ident[elfcpp::EI_MAG1] = elfcpp::ELFMAG1;
274 e_ident[elfcpp::EI_MAG2] = elfcpp::ELFMAG2;
275 e_ident[elfcpp::EI_MAG3] = elfcpp::ELFMAG3;
277 e_ident[elfcpp::EI_CLASS] = elfcpp::ELFCLASS32;
279 e_ident[elfcpp::EI_CLASS] = elfcpp::ELFCLASS64;
282 e_ident[elfcpp::EI_DATA] = (big_endian
283 ? elfcpp::ELFDATA2MSB
284 : elfcpp::ELFDATA2LSB);
285 e_ident[elfcpp::EI_VERSION] = elfcpp::EV_CURRENT;
288 oehdr.put_e_type(elfcpp::ET_REL);
290 oehdr.put_e_version(elfcpp::EV_CURRENT);
293 oehdr.put_e_shoff(elfcpp::Elf_sizes<size>::ehdr_size);
295 oehdr.put_e_ehsize(elfcpp::Elf_sizes<size>::ehdr_size);
298 oehdr.put_e_shentsize(elfcpp::Elf_sizes<size>::shdr_size);
302 *ppout += elfcpp::Elf_sizes<size>::ehdr_size;
312 elfcpp::SHT type,
322 elfcpp::Shdr_write<size, big_endian> oshdr(*ppout);
335 *ppout += elfcpp::Elf_sizes<size>::shdr_size;
346 typename elfcpp::Elf_types<32>::Elf_WXword st_size,
352 elfcpp::Sym_write<size, big_endian> osym(pout);
356 osym.put_st_info(name.empty() ? elfcpp::STB_LOCAL : elfcpp::STB_GLOBAL,
357 elfcpp::STT_NOTYPE);
358 osym.put_st_other(elfcpp::STV_DEFAULT, 0);
361 *ppout += elfcpp::Elf_sizes<size>::sym_size;