Lines Matching defs:ELFT

36 template <class ELFT> void ELFWriter<ELFT>::writePhdr(const Segment &Seg) {
66 template <class ELFT> void ELFWriter<ELFT>::writeShdr(const SectionBase &Sec) {
82 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(Section &) {
86 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(OwnedDataSection &) {
90 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(StringTableSection &) {
94 template <class ELFT>
95 Error ELFSectionSizer<ELFT>::visit(DynamicRelocationSection &) {
99 template <class ELFT>
100 Error ELFSectionSizer<ELFT>::visit(SymbolTableSection &Sec) {
104 Sec.Align = ELFT::Is64Bits ? sizeof(Elf_Xword) : sizeof(Elf_Word);
121 template <class ELFT>
122 Error ELFSectionSizer<ELFT>::visit(RelocationSection &Sec) {
124 Sec.Size = encodeCrel<ELFT::Is64Bits>(Sec.Relocations).size();
129 Sec.Align = ELFT::Is64Bits ? sizeof(Elf_Xword) : sizeof(Elf_Word);
134 template <class ELFT>
135 Error ELFSectionSizer<ELFT>::visit(GnuDebugLinkSection &) {
139 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(GroupSection &Sec) {
144 template <class ELFT>
145 Error ELFSectionSizer<ELFT>::visit(SectionIndexSection &) {
149 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(CompressedSection &) {
153 template <class ELFT>
154 Error ELFSectionSizer<ELFT>::visit(DecompressedSection &) {
460 template <class ELFT>
461 Error ELFSectionWriter<ELFT>::visit(const DecompressedSection &Sec) {
463 Sec.OriginalData.slice(sizeof(Elf_Chdr_Impl<ELFT>));
533 template <class ELFT>
534 Error ELFSectionWriter<ELFT>::visit(const CompressedSection &Sec) {
536 Elf_Chdr_Impl<ELFT> Chdr = {};
614 template <class ELFT>
615 Error ELFSectionWriter<ELFT>::visit(const SectionIndexSection &Sec) {
861 template <class ELFT>
862 Error ELFSectionWriter<ELFT>::visit(const SymbolTableSection &Sec) {
964 template <class ELFT>
965 static void setAddend(Elf_Rel_Impl<ELFT, false> &, uint64_t) {}
967 template <class ELFT>
968 static void setAddend(Elf_Rel_Impl<ELFT, true> &Rela, uint64_t Addend) {
983 template <class ELFT>
984 Error ELFSectionWriter<ELFT>::visit(const RelocationSection &Sec) {
987 auto Content = encodeCrel<ELFT::Is64Bits>(Sec.Relocations);
1178 template <class ELFT>
1179 Error ELFSectionWriter<ELFT>::visit(const GnuDebugLinkSection &Sec) {
1197 template <class ELFT>
1198 Error ELFSectionWriter<ELFT>::visit(const GroupSection &Sec) {
1201 endian::write32<ELFT::Endianness>(Buf++, Sec.FlagWord);
1203 endian::write32<ELFT::Endianness>(Buf++, S->Index);
1407 template <class ELFT>
1408 ELFBuilder<ELFT>::ELFBuilder(const ELFObjectFile<ELFT> &ElfObj, Object &Obj,
1415 template <class ELFT> void ELFBuilder<ELFT>::setParentSegment(Segment &Child) {
1431 template <class ELFT> Error ELFBuilder<ELFT>::findEhdrOffset() {
1446 template <class ELFT>
1447 Error ELFBuilder<ELFT>::readProgramHeaders(const ELFFile<ELFT> &HeadersFile) {
1450 Expected<typename ELFFile<ELFT>::Elf_Phdr_Range> Headers =
1455 for (const typename ELFFile<ELFT>::Elf_Phdr &Phdr : *Headers) {
1488 const typename ELFT::Ehdr &Ehdr = HeadersFile.getHeader();
1513 template <class ELFT>
1514 Error ELFBuilder<ELFT>::initGroupSection(GroupSection *GroupSec) {
1548 GroupSec->setFlagWord(endian::read32<ELFT::Endianness>(Word++));
1550 uint32_t Index = support::endian::read32<ELFT::Endianness>(Word);
1563 template <class ELFT>
1564 Error ELFBuilder<ELFT>::initSymbolTable(SymbolTableSection *SymTab) {
1575 Expected<typename ELFFile<ELFT>::Elf_Sym_Range> Symbols =
1580 for (const typename ELFFile<ELFT>::Elf_Sym &Sym : *Symbols) {
1646 template <class ELFT>
1647 static void getAddend(uint64_t &, const Elf_Rel_Impl<ELFT, false> &) {}
1649 template <class ELFT>
1650 static void getAddend(uint64_t &ToSet, const Elf_Rel_Impl<ELFT, true> &Rela) {
1703 template <class ELFT>
1704 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) {
1777 auto *Chdr = reinterpret_cast<const Elf_Chdr_Impl<ELFT> *>(Data->data());
1784 template <class ELFT> Error ELFBuilder<ELFT>::readSectionHeaders() {
1786 Expected<typename ELFFile<ELFT>::Elf_Shdr_Range> Sections =
1791 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) {
1824 template <class ELFT> Error ELFBuilder<ELFT>::readSections(bool EnsureSymtab) {
1879 Expected<typename ELFFile<ELFT>::Elf_Shdr_Range> Sections =
1884 const typename ELFFile<ELFT>::Elf_Shdr *Shdr =
1895 Expected<typename ELFFile<ELFT>::Elf_Rel_Range> Rels =
1903 Expected<typename ELFFile<ELFT>::Elf_Rela_Range> Relas =
1920 template <class ELFT> Error ELFBuilder<ELFT>::build(bool EnsureSymtab) {
1929 Expected<ELFFile<ELFT>> HeadersFile = ELFFile<ELFT>::create(toStringRef(
1934 const typename ELFFile<ELFT>::Elf_Ehdr &Ehdr = HeadersFile->getHeader();
2019 template <class ELFT> void ELFWriter<ELFT>::writeEhdr() {
2026 Ehdr.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32;
2028 ELFT::Endianness == llvm::endianness::big ? ELFDATA2MSB : ELFDATA2LSB;
2076 template <class ELFT> void ELFWriter<ELFT>::writePhdrs() {
2081 template <class ELFT> void ELFWriter<ELFT>::writeShdrs() {
2110 template <class ELFT> Error ELFWriter<ELFT>::writeSectionData() {
2122 template <class ELFT> void ELFWriter<ELFT>::writeSegmentData() {
2151 template <class ELFT>
2152 ELFWriter<ELFT>::ELFWriter(Object &Obj, raw_ostream &Buf, bool WSH,
2486 template <class ELFT> void ELFWriter<ELFT>::initEhdrSegment() {
2496 template <class ELFT> void ELFWriter<ELFT>::assignOffsets() {
2531 template <class ELFT> size_t ELFWriter<ELFT>::totalSize() const {
2540 template <class ELFT> Error ELFWriter<ELFT>::write() {
2576 template <class ELFT> Error ELFWriter<ELFT>::finalize() {
2644 auto SecSizer = std::make_unique<ELFSectionSizer<ELFT>>();
2688 SecWriter = std::make_unique<ELFSectionWriter<ELFT>>(*Buf);