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()
1537 Expected<const Elf_Shdr *> Shdr = ElfFile.getSection(SymTab->Index); in initSymbolTable() local
1538 if (!Shdr) in initSymbolTable()
1539 return Shdr.takeError(); in initSymbolTable()
1541 Expected<StringRef> StrTabData = ElfFile.getStringTableForSymtab(**Shdr); in initSymbolTable()
1548 ElfFile.symbols(*Shdr); in initSymbolTable()
1676 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) { in makeSection() argument
1677 switch (Shdr.sh_type) { in makeSection()
1680 if (Shdr.sh_flags & SHF_ALLOC) { in makeSection()
1681 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1691 if (Shdr.sh_flags & SHF_ALLOC) { in makeSection()
1692 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1702 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1707 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1712 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1717 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1738 Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr); in makeSection()
1742 Expected<StringRef> Name = ElfFile.getSectionName(Shdr); in makeSection()
1746 if (!(Shdr.sh_flags & ELF::SHF_COMPRESSED)) in makeSection()
1762 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) { in readSectionHeaders()
1767 Expected<SectionBase &> Sec = makeSection(Shdr); in readSectionHeaders()
1771 Expected<StringRef> SecName = ElfFile.getSectionName(Shdr); in readSectionHeaders()
1775 Sec->Type = Sec->OriginalType = Shdr.sh_type; in readSectionHeaders()
1776 Sec->Flags = Sec->OriginalFlags = Shdr.sh_flags; in readSectionHeaders()
1777 Sec->Addr = Shdr.sh_addr; in readSectionHeaders()
1778 Sec->Offset = Shdr.sh_offset; in readSectionHeaders()
1779 Sec->OriginalOffset = Shdr.sh_offset; in readSectionHeaders()
1780 Sec->Size = Shdr.sh_size; in readSectionHeaders()
1781 Sec->Link = Shdr.sh_link; in readSectionHeaders()
1782 Sec->Info = Shdr.sh_info; in readSectionHeaders()
1783 Sec->Align = Shdr.sh_addralign; in readSectionHeaders()
1784 Sec->EntrySize = Shdr.sh_entsize; in readSectionHeaders()
1788 ElfFile.base() + Shdr.sh_offset, in readSectionHeaders()
1789 (Shdr.sh_type == SHT_NOBITS) ? (size_t)0 : Shdr.sh_size); in readSectionHeaders()
1855 const typename ELFFile<ELFT>::Elf_Shdr *Shdr = in readSections() local
1859 ElfFile.rels(*Shdr); in readSections()
1867 ElfFile.relas(*Shdr); in readSections()
2048 Elf_Shdr &Shdr = in writeShdrs() local
2050 Shdr.sh_name = 0; in writeShdrs()
2051 Shdr.sh_type = SHT_NULL; in writeShdrs()
2052 Shdr.sh_flags = 0; in writeShdrs()
2053 Shdr.sh_addr = 0; in writeShdrs()
2054 Shdr.sh_offset = 0; in writeShdrs()
2058 Shdr.sh_size = Shnum; in writeShdrs()
2060 Shdr.sh_size = 0; in writeShdrs()
2063 Shdr.sh_link = Obj.SectionNames->Index; in writeShdrs()
2065 Shdr.sh_link = 0; in writeShdrs()
2066 Shdr.sh_info = 0; in writeShdrs()
2067 Shdr.sh_addralign = 0; in writeShdrs()
2068 Shdr.sh_entsize = 0; in writeShdrs()