Lines Matching refs:Shdr
32 std::error_code dumpCommonSection(const Elf_Shdr *Shdr, ELFYAML::Section &S);
33 std::error_code dumpCommonRelocationSection(const Elf_Shdr *Shdr,
36 std::error_code dumpRelocation(const Elf_Shdr *Shdr, const RelT *Rel,
39 ErrorOr<ELFYAML::RelocationSection *> dumpRelSection(const Elf_Shdr *Shdr);
40 ErrorOr<ELFYAML::RelocationSection *> dumpRelaSection(const Elf_Shdr *Shdr);
42 dumpContentSection(const Elf_Shdr *Shdr);
43 ErrorOr<ELFYAML::Group *> dumpGroup(const Elf_Shdr *Shdr);
152 const Elf_Shdr *Shdr = Obj.getSection(&*Sym); in dumpSymbol() local
153 if (!Shdr) in dumpSymbol()
156 NameOrErr = Obj.getSectionName(Shdr); in dumpSymbol()
166 std::error_code ELFDumper<ELFT>::dumpRelocation(const Elf_Shdr *Shdr, in dumpRelocation() argument
173 auto NamePair = Obj.getRelocationSymbol(Shdr, Rel); in dumpRelocation()
187 std::error_code ELFDumper<ELFT>::dumpCommonSection(const Elf_Shdr *Shdr, in dumpCommonSection() argument
189 S.Type = Shdr->sh_type; in dumpCommonSection()
190 S.Flags = Shdr->sh_flags; in dumpCommonSection()
191 S.Address = Shdr->sh_addr; in dumpCommonSection()
192 S.AddressAlign = Shdr->sh_addralign; in dumpCommonSection()
194 ErrorOr<StringRef> NameOrErr = Obj.getSectionName(Shdr); in dumpCommonSection()
199 if (Shdr->sh_link != ELF::SHN_UNDEF) { in dumpCommonSection()
200 if (const Elf_Shdr *LinkSection = Obj.getSection(Shdr->sh_link)) { in dumpCommonSection()
213 ELFDumper<ELFT>::dumpCommonRelocationSection(const Elf_Shdr *Shdr, in dumpCommonRelocationSection() argument
215 if (std::error_code EC = dumpCommonSection(Shdr, S)) in dumpCommonRelocationSection()
218 if (const Elf_Shdr *InfoSection = Obj.getSection(Shdr->sh_info)) { in dumpCommonRelocationSection()
230 ELFDumper<ELFT>::dumpRelSection(const Elf_Shdr *Shdr) { in dumpRelSection() argument
231 assert(Shdr->sh_type == ELF::SHT_REL && "Section type is not SHT_REL"); in dumpRelSection()
234 if (std::error_code EC = dumpCommonRelocationSection(Shdr, *S)) in dumpRelSection()
237 for (auto RI = Obj.begin_rel(Shdr), RE = Obj.end_rel(Shdr); RI != RE; in dumpRelSection()
240 if (std::error_code EC = dumpRelocation(Shdr, &*RI, R)) in dumpRelSection()
250 ELFDumper<ELFT>::dumpRelaSection(const Elf_Shdr *Shdr) { in dumpRelaSection() argument
251 assert(Shdr->sh_type == ELF::SHT_RELA && "Section type is not SHT_RELA"); in dumpRelaSection()
254 if (std::error_code EC = dumpCommonRelocationSection(Shdr, *S)) in dumpRelaSection()
257 for (auto RI = Obj.begin_rela(Shdr), RE = Obj.end_rela(Shdr); RI != RE; in dumpRelaSection()
260 if (std::error_code EC = dumpRelocation(Shdr, &*RI, R)) in dumpRelaSection()
271 ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) { in dumpContentSection() argument
274 if (std::error_code EC = dumpCommonSection(Shdr, *S)) in dumpContentSection()
277 ErrorOr<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(Shdr); in dumpContentSection()
287 ErrorOr<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) { in dumpGroup() argument
290 if (std::error_code EC = dumpCommonSection(Shdr, *S)) in dumpGroup()
293 const Elf_Sym *symbol = Obj.getSymbol(Shdr->sh_info); in dumpGroup()
294 const Elf_Shdr *symtab = Obj.getSection(Shdr->sh_link); in dumpGroup()
295 auto sectionContents = Obj.getSectionContents(Shdr); in dumpGroup()
304 const long count = (Shdr->sh_size) / sizeof(Elf_Word); in dumpGroup()