Lines Matching defs:Shdr
69 Elf_Shdr &Shdr = *reinterpret_cast<Elf_Shdr *>(B);
70 Shdr.sh_name = Sec.NameIndex;
71 Shdr.sh_type = Sec.Type;
72 Shdr.sh_flags = Sec.Flags;
73 Shdr.sh_addr = Sec.Addr;
74 Shdr.sh_offset = Sec.Offset;
75 Shdr.sh_size = Sec.Size;
76 Shdr.sh_link = Sec.Link;
77 Shdr.sh_info = Sec.Info;
78 Shdr.sh_addralign = Sec.Align;
79 Shdr.sh_entsize = Sec.EntrySize;
1565 Expected<const Elf_Shdr *> Shdr = ElfFile.getSection(SymTab->Index);
1566 if (!Shdr)
1567 return Shdr.takeError();
1569 Expected<StringRef> StrTabData = ElfFile.getStringTableForSymtab(**Shdr);
1576 ElfFile.symbols(*Shdr);
1704 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) {
1705 switch (Shdr.sh_type) {
1709 if (Shdr.sh_flags & SHF_ALLOC) {
1710 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr))
1720 if (Shdr.sh_flags & SHF_ALLOC) {
1721 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr))
1731 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr))
1736 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr))
1741 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr))
1746 if (Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr))
1767 Expected<ArrayRef<uint8_t>> Data = ElfFile.getSectionContents(Shdr);
1771 Expected<StringRef> Name = ElfFile.getSectionName(Shdr);
1775 if (!(Shdr.sh_flags & ELF::SHF_COMPRESSED))
1791 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) {
1796 Expected<SectionBase &> Sec = makeSection(Shdr);
1800 Expected<StringRef> SecName = ElfFile.getSectionName(Shdr);
1804 Sec->Type = Sec->OriginalType = Shdr.sh_type;
1805 Sec->Flags = Sec->OriginalFlags = Shdr.sh_flags;
1806 Sec->Addr = Shdr.sh_addr;
1807 Sec->Offset = Shdr.sh_offset;
1808 Sec->OriginalOffset = Shdr.sh_offset;
1809 Sec->Size = Shdr.sh_size;
1810 Sec->Link = Shdr.sh_link;
1811 Sec->Info = Shdr.sh_info;
1812 Sec->Align = Shdr.sh_addralign;
1813 Sec->EntrySize = Shdr.sh_entsize;
1817 ElfFile.base() + Shdr.sh_offset,
1818 (Shdr.sh_type == SHT_NOBITS) ? (size_t)0 : Shdr.sh_size);
1884 const typename ELFFile<ELFT>::Elf_Shdr *Shdr =
1887 auto RelsOrRelas = ElfFile.crels(*Shdr);
1896 ElfFile.rels(*Shdr);
1904 ElfFile.relas(*Shdr);
2084 Elf_Shdr &Shdr =
2086 Shdr.sh_name = 0;
2087 Shdr.sh_type = SHT_NULL;
2088 Shdr.sh_flags = 0;
2089 Shdr.sh_addr = 0;
2090 Shdr.sh_offset = 0;
2094 Shdr.sh_size = Shnum;
2096 Shdr.sh_size = 0;
2099 Shdr.sh_link = Obj.SectionNames->Index;
2101 Shdr.sh_link = 0;
2102 Shdr.sh_info = 0;
2103 Shdr.sh_addralign = 0;
2104 Shdr.sh_entsize = 0;