Lines Matching refs:Shdr
70 Elf_Shdr &Shdr = *reinterpret_cast<Elf_Shdr *>(B); in writeShdr() local
71 Shdr.sh_name = Sec.NameIndex; in writeShdr()
72 Shdr.sh_type = Sec.Type; in writeShdr()
73 Shdr.sh_flags = Sec.Flags; in writeShdr()
74 Shdr.sh_addr = Sec.Addr; in writeShdr()
75 Shdr.sh_offset = Sec.Offset; in writeShdr()
76 Shdr.sh_size = Sec.Size; in writeShdr()
77 Shdr.sh_link = Sec.Link; in writeShdr()
78 Shdr.sh_info = Sec.Info; in writeShdr()
79 Shdr.sh_addralign = Sec.Align; in writeShdr()
80 Shdr.sh_entsize = Sec.EntrySize; in writeShdr()
1538 Expected<const Elf_Shdr *> Shdr = ElfFile.getSection(SymTab->Index); in initSymbolTable() local
1539 if (!Shdr) in initSymbolTable()
1540 return Shdr.takeError(); in initSymbolTable()
1542 Expected<StringRef> StrTabData = ElfFile.getStringTableForSymtab(**Shdr); in initSymbolTable()
1549 ElfFile.symbols(*Shdr); in initSymbolTable()
1677 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) { in makeSection() argument
1678 switch (Shdr.sh_type) { in makeSection()
1681 if (Shdr.sh_flags & SHF_ALLOC) { in makeSection()
1682 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1692 if (Shdr.sh_flags & SHF_ALLOC) { in makeSection()
1693 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1703 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1708 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1713 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1718 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1735 Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr); in makeSection()
1739 Expected<StringRef> Name = ElfFile.getSectionName(Shdr); in makeSection()
1743 if (Name->startswith(".zdebug") || (Shdr.sh_flags & ELF::SHF_COMPRESSED)) { in makeSection()
1767 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) { in readSectionHeaders()
1772 Expected<SectionBase &> Sec = makeSection(Shdr); in readSectionHeaders()
1776 Expected<StringRef> SecName = ElfFile.getSectionName(Shdr); in readSectionHeaders()
1780 Sec->Type = Sec->OriginalType = Shdr.sh_type; in readSectionHeaders()
1781 Sec->Flags = Sec->OriginalFlags = Shdr.sh_flags; in readSectionHeaders()
1782 Sec->Addr = Shdr.sh_addr; in readSectionHeaders()
1783 Sec->Offset = Shdr.sh_offset; in readSectionHeaders()
1784 Sec->OriginalOffset = Shdr.sh_offset; in readSectionHeaders()
1785 Sec->Size = Shdr.sh_size; in readSectionHeaders()
1786 Sec->Link = Shdr.sh_link; in readSectionHeaders()
1787 Sec->Info = Shdr.sh_info; in readSectionHeaders()
1788 Sec->Align = Shdr.sh_addralign; in readSectionHeaders()
1789 Sec->EntrySize = Shdr.sh_entsize; in readSectionHeaders()
1793 ArrayRef<uint8_t>(ElfFile.base() + Shdr.sh_offset, in readSectionHeaders()
1794 (Shdr.sh_type == SHT_NOBITS) ? (size_t)0 : Shdr.sh_size); in readSectionHeaders()
1860 const typename ELFFile<ELFT>::Elf_Shdr *Shdr = in readSections() local
1864 ElfFile.rels(*Shdr); in readSections()
1872 ElfFile.relas(*Shdr); in readSections()
2051 Elf_Shdr &Shdr = in writeShdrs() local
2053 Shdr.sh_name = 0; in writeShdrs()
2054 Shdr.sh_type = SHT_NULL; in writeShdrs()
2055 Shdr.sh_flags = 0; in writeShdrs()
2056 Shdr.sh_addr = 0; in writeShdrs()
2057 Shdr.sh_offset = 0; in writeShdrs()
2061 Shdr.sh_size = Shnum; in writeShdrs()
2063 Shdr.sh_size = 0; in writeShdrs()
2066 Shdr.sh_link = Obj.SectionNames->Index; in writeShdrs()
2068 Shdr.sh_link = 0; in writeShdrs()
2069 Shdr.sh_info = 0; in writeShdrs()
2070 Shdr.sh_addralign = 0; in writeShdrs()
2071 Shdr.sh_entsize = 0; in writeShdrs()