Lines Matching refs:Shdr
72 Elf_Shdr &Shdr = *reinterpret_cast<Elf_Shdr *>(B); in writeShdr() local
73 Shdr.sh_name = Sec.NameIndex; in writeShdr()
74 Shdr.sh_type = Sec.Type; in writeShdr()
75 Shdr.sh_flags = Sec.Flags; in writeShdr()
76 Shdr.sh_addr = Sec.Addr; in writeShdr()
77 Shdr.sh_offset = Sec.Offset; in writeShdr()
78 Shdr.sh_size = Sec.Size; in writeShdr()
79 Shdr.sh_link = Sec.Link; in writeShdr()
80 Shdr.sh_info = Sec.Info; in writeShdr()
81 Shdr.sh_addralign = Sec.Align; in writeShdr()
82 Shdr.sh_entsize = Sec.EntrySize; in writeShdr()
1568 Expected<const Elf_Shdr *> Shdr = ElfFile.getSection(SymTab->Index); in initSymbolTable() local
1569 if (!Shdr) in initSymbolTable()
1570 return Shdr.takeError(); in initSymbolTable()
1572 Expected<StringRef> StrTabData = ElfFile.getStringTableForSymtab(**Shdr); in initSymbolTable()
1579 ElfFile.symbols(*Shdr); in initSymbolTable()
1707 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) { in makeSection() argument
1708 switch (Shdr.sh_type) { in makeSection()
1712 if (Shdr.sh_flags & SHF_ALLOC) { in makeSection()
1713 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1723 if (Shdr.sh_flags & SHF_ALLOC) { in makeSection()
1724 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1734 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1739 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1744 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1749 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr)) in makeSection()
1770 Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr); in makeSection()
1774 Expected<StringRef> Name = ElfFile.getSectionName(Shdr); in makeSection()
1778 if (!(Shdr.sh_flags & ELF::SHF_COMPRESSED)) in makeSection()
1794 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) { in readSectionHeaders()
1799 Expected<SectionBase &> Sec = makeSection(Shdr); in readSectionHeaders()
1803 Expected<StringRef> SecName = ElfFile.getSectionName(Shdr); in readSectionHeaders()
1807 Sec->Type = Sec->OriginalType = Shdr.sh_type; in readSectionHeaders()
1808 Sec->Flags = Sec->OriginalFlags = Shdr.sh_flags; in readSectionHeaders()
1809 Sec->Addr = Shdr.sh_addr; in readSectionHeaders()
1810 Sec->Offset = Shdr.sh_offset; in readSectionHeaders()
1811 Sec->OriginalOffset = Shdr.sh_offset; in readSectionHeaders()
1812 Sec->Size = Shdr.sh_size; in readSectionHeaders()
1813 Sec->Link = Shdr.sh_link; in readSectionHeaders()
1814 Sec->Info = Shdr.sh_info; in readSectionHeaders()
1815 Sec->Align = Shdr.sh_addralign; in readSectionHeaders()
1816 Sec->EntrySize = Shdr.sh_entsize; in readSectionHeaders()
1820 ElfFile.base() + Shdr.sh_offset, in readSectionHeaders()
1821 (Shdr.sh_type == SHT_NOBITS) ? (size_t)0 : Shdr.sh_size); in readSectionHeaders()
1887 const typename ELFFile<ELFT>::Elf_Shdr *Shdr = in readSections() local
1890 auto RelsOrRelas = ElfFile.crels(*Shdr); in readSections()
1899 ElfFile.rels(*Shdr); in readSections()
1907 ElfFile.relas(*Shdr); in readSections()
2087 Elf_Shdr &Shdr = in writeShdrs() local
2089 Shdr.sh_name = 0; in writeShdrs()
2090 Shdr.sh_type = SHT_NULL; in writeShdrs()
2091 Shdr.sh_flags = 0; in writeShdrs()
2092 Shdr.sh_addr = 0; in writeShdrs()
2093 Shdr.sh_offset = 0; in writeShdrs()
2097 Shdr.sh_size = Shnum; in writeShdrs()
2099 Shdr.sh_size = 0; in writeShdrs()
2102 Shdr.sh_link = Obj.SectionNames->Index; in writeShdrs()
2104 Shdr.sh_link = 0; in writeShdrs()
2105 Shdr.sh_info = 0; in writeShdrs()
2106 Shdr.sh_addralign = 0; in writeShdrs()
2107 Shdr.sh_entsize = 0; in writeShdrs()