Lines Matching defs:ELFT

39 template <class ELFT> void ELFWriter<ELFT>::writePhdr(const Segment &Seg) {
69 template <class ELFT> void ELFWriter<ELFT>::writeShdr(const SectionBase &Sec) {
85 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(Section &) {
89 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(OwnedDataSection &) {
93 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(StringTableSection &) {
97 template <class ELFT>
98 Error ELFSectionSizer<ELFT>::visit(DynamicRelocationSection &) {
102 template <class ELFT>
103 Error ELFSectionSizer<ELFT>::visit(SymbolTableSection &Sec) {
107 Sec.Align = ELFT::Is64Bits ? sizeof(Elf_Xword) : sizeof(Elf_Word);
124 template <class ELFT>
125 Error ELFSectionSizer<ELFT>::visit(RelocationSection &Sec) {
127 Sec.Size = encodeCrel<ELFT::Is64Bits>(Sec.Relocations).size();
132 Sec.Align = ELFT::Is64Bits ? sizeof(Elf_Xword) : sizeof(Elf_Word);
137 template <class ELFT>
138 Error ELFSectionSizer<ELFT>::visit(GnuDebugLinkSection &) {
142 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(GroupSection &Sec) {
147 template <class ELFT>
148 Error ELFSectionSizer<ELFT>::visit(SectionIndexSection &) {
152 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(CompressedSection &) {
156 template <class ELFT>
157 Error ELFSectionSizer<ELFT>::visit(DecompressedSection &) {
463 template <class ELFT>
464 Error ELFSectionWriter<ELFT>::visit(const DecompressedSection &Sec) {
466 Sec.OriginalData.slice(sizeof(Elf_Chdr_Impl<ELFT>));
536 template <class ELFT>
537 Error ELFSectionWriter<ELFT>::visit(const CompressedSection &Sec) {
539 Elf_Chdr_Impl<ELFT> Chdr = {};
617 template <class ELFT>
618 Error ELFSectionWriter<ELFT>::visit(const SectionIndexSection &Sec) {
864 template <class ELFT>
865 Error ELFSectionWriter<ELFT>::visit(const SymbolTableSection &Sec) {
967 template <class ELFT>
968 static void setAddend(Elf_Rel_Impl<ELFT, false> &, uint64_t) {}
970 template <class ELFT>
971 static void setAddend(Elf_Rel_Impl<ELFT, true> &Rela, uint64_t Addend) {
986 template <class ELFT>
987 Error ELFSectionWriter<ELFT>::visit(const RelocationSection &Sec) {
990 auto Content = encodeCrel<ELFT::Is64Bits>(Sec.Relocations);
1181 template <class ELFT>
1182 Error ELFSectionWriter<ELFT>::visit(const GnuDebugLinkSection &Sec) {
1200 template <class ELFT>
1201 Error ELFSectionWriter<ELFT>::visit(const GroupSection &Sec) {
1204 endian::write32<ELFT::Endianness>(Buf++, Sec.FlagWord);
1206 endian::write32<ELFT::Endianness>(Buf++, S->Index);
1410 template <class ELFT>
1411 ELFBuilder<ELFT>::ELFBuilder(const ELFObjectFile<ELFT> &ElfObj, Object &Obj,
1418 template <class ELFT> void ELFBuilder<ELFT>::setParentSegment(Segment &Child) {
1434 template <class ELFT> Error ELFBuilder<ELFT>::findEhdrOffset() {
1449 template <class ELFT>
1450 Error ELFBuilder<ELFT>::readProgramHeaders(const ELFFile<ELFT> &HeadersFile) {
1453 Expected<typename ELFFile<ELFT>::Elf_Phdr_Range> Headers =
1458 for (const typename ELFFile<ELFT>::Elf_Phdr &Phdr : *Headers) {
1491 const typename ELFT::Ehdr &Ehdr = HeadersFile.getHeader();
1516 template <class ELFT>
1517 Error ELFBuilder<ELFT>::initGroupSection(GroupSection *GroupSec) {
1551 GroupSec->setFlagWord(endian::read32<ELFT::Endianness>(Word++));
1553 uint32_t Index = support::endian::read32<ELFT::Endianness>(Word);
1566 template <class ELFT>
1567 Error ELFBuilder<ELFT>::initSymbolTable(SymbolTableSection *SymTab) {
1578 Expected<typename ELFFile<ELFT>::Elf_Sym_Range> Symbols =
1583 for (const typename ELFFile<ELFT>::Elf_Sym &Sym : *Symbols) {
1649 template <class ELFT>
1650 static void getAddend(uint64_t &, const Elf_Rel_Impl<ELFT, false> &) {}
1652 template <class ELFT>
1653 static void getAddend(uint64_t &ToSet, const Elf_Rel_Impl<ELFT, true> &Rela) {
1706 template <class ELFT>
1707 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) {
1780 auto *Chdr = reinterpret_cast<const Elf_Chdr_Impl<ELFT> *>(Data->data());
1787 template <class ELFT> Error ELFBuilder<ELFT>::readSectionHeaders() {
1789 Expected<typename ELFFile<ELFT>::Elf_Shdr_Range> Sections =
1794 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) {
1827 template <class ELFT> Error ELFBuilder<ELFT>::readSections(bool EnsureSymtab) {
1882 Expected<typename ELFFile<ELFT>::Elf_Shdr_Range> Sections =
1887 const typename ELFFile<ELFT>::Elf_Shdr *Shdr =
1898 Expected<typename ELFFile<ELFT>::Elf_Rel_Range> Rels =
1906 Expected<typename ELFFile<ELFT>::Elf_Rela_Range> Relas =
1923 template <class ELFT> Error ELFBuilder<ELFT>::build(bool EnsureSymtab) {
1932 Expected<ELFFile<ELFT>> HeadersFile = ELFFile<ELFT>::create(toStringRef(
1937 const typename ELFFile<ELFT>::Elf_Ehdr &Ehdr = HeadersFile->getHeader();
2022 template <class ELFT> void ELFWriter<ELFT>::writeEhdr() {
2029 Ehdr.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32;
2031 ELFT::Endianness == llvm::endianness::big ? ELFDATA2MSB : ELFDATA2LSB;
2079 template <class ELFT> void ELFWriter<ELFT>::writePhdrs() {
2084 template <class ELFT> void ELFWriter<ELFT>::writeShdrs() {
2113 template <class ELFT> Error ELFWriter<ELFT>::writeSectionData() {
2125 template <class ELFT> void ELFWriter<ELFT>::writeSegmentData() {
2154 template <class ELFT>
2155 ELFWriter<ELFT>::ELFWriter(Object &Obj, raw_ostream &Buf, bool WSH,
2480 template <class ELFT> void ELFWriter<ELFT>::initEhdrSegment() {
2490 template <class ELFT> void ELFWriter<ELFT>::assignOffsets() {
2525 template <class ELFT> size_t ELFWriter<ELFT>::totalSize() const {
2534 template <class ELFT> Error ELFWriter<ELFT>::write() {
2570 template <class ELFT> Error ELFWriter<ELFT>::finalize() {
2638 auto SecSizer = std::make_unique<ELFSectionSizer<ELFT>>();
2682 SecWriter = std::make_unique<ELFSectionWriter<ELFT>>(*Buf);