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