Lines Matching refs:Shdr
33 std::error_code dumpCommonSection(const Elf_Shdr *Shdr, ELFYAML::Section &S);
34 std::error_code dumpCommonRelocationSection(const Elf_Shdr *Shdr,
40 ErrorOr<ELFYAML::RelocationSection *> dumpRelSection(const Elf_Shdr *Shdr);
41 ErrorOr<ELFYAML::RelocationSection *> dumpRelaSection(const Elf_Shdr *Shdr);
43 dumpContentSection(const Elf_Shdr *Shdr);
44 ErrorOr<ELFYAML::NoBitsSection *> dumpNoBitsSection(const Elf_Shdr *Shdr);
45 ErrorOr<ELFYAML::Group *> dumpGroup(const Elf_Shdr *Shdr);
46 ErrorOr<ELFYAML::MipsABIFlags *> dumpMipsABIFlags(const Elf_Shdr *Shdr);
190 const Elf_Shdr *Shdr = *ShdrOrErr; in dumpSymbol() local
191 if (!Shdr) in dumpSymbol()
194 NameOrErr = Obj.getSectionName(Shdr); in dumpSymbol()
229 std::error_code ELFDumper<ELFT>::dumpCommonSection(const Elf_Shdr *Shdr, in dumpCommonSection() argument
231 S.Type = Shdr->sh_type; in dumpCommonSection()
232 S.Flags = Shdr->sh_flags; in dumpCommonSection()
233 S.Address = Shdr->sh_addr; in dumpCommonSection()
234 S.AddressAlign = Shdr->sh_addralign; in dumpCommonSection()
236 ErrorOr<StringRef> NameOrErr = Obj.getSectionName(Shdr); in dumpCommonSection()
241 if (Shdr->sh_link != ELF::SHN_UNDEF) { in dumpCommonSection()
242 ErrorOr<const Elf_Shdr *> LinkSection = Obj.getSection(Shdr->sh_link); in dumpCommonSection()
256 ELFDumper<ELFT>::dumpCommonRelocationSection(const Elf_Shdr *Shdr, in dumpCommonRelocationSection() argument
258 if (std::error_code EC = dumpCommonSection(Shdr, S)) in dumpCommonRelocationSection()
261 ErrorOr<const Elf_Shdr *> InfoSection = Obj.getSection(Shdr->sh_info); in dumpCommonRelocationSection()
275 ELFDumper<ELFT>::dumpRelSection(const Elf_Shdr *Shdr) { in dumpRelSection() argument
276 assert(Shdr->sh_type == ELF::SHT_REL && "Section type is not SHT_REL"); in dumpRelSection()
279 if (std::error_code EC = dumpCommonRelocationSection(Shdr, *S)) in dumpRelSection()
282 ErrorOr<const Elf_Shdr *> SymTabOrErr = Obj.getSection(Shdr->sh_link); in dumpRelSection()
287 for (auto RI = Obj.rel_begin(Shdr), RE = Obj.rel_end(Shdr); RI != RE; ++RI) { in dumpRelSection()
299 ELFDumper<ELFT>::dumpRelaSection(const Elf_Shdr *Shdr) { in dumpRelaSection() argument
300 assert(Shdr->sh_type == ELF::SHT_RELA && "Section type is not SHT_RELA"); in dumpRelaSection()
303 if (std::error_code EC = dumpCommonRelocationSection(Shdr, *S)) in dumpRelaSection()
306 ErrorOr<const Elf_Shdr *> SymTabOrErr = Obj.getSection(Shdr->sh_link); in dumpRelaSection()
311 for (auto RI = Obj.rela_begin(Shdr), RE = Obj.rela_end(Shdr); RI != RE; in dumpRelaSection()
325 ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) { in dumpContentSection() argument
328 if (std::error_code EC = dumpCommonSection(Shdr, *S)) in dumpContentSection()
331 ErrorOr<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(Shdr); in dumpContentSection()
342 ELFDumper<ELFT>::dumpNoBitsSection(const Elf_Shdr *Shdr) { in dumpNoBitsSection() argument
345 if (std::error_code EC = dumpCommonSection(Shdr, *S)) in dumpNoBitsSection()
347 S->Size = Shdr->sh_size; in dumpNoBitsSection()
353 ErrorOr<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) { in dumpGroup() argument
356 if (std::error_code EC = dumpCommonSection(Shdr, *S)) in dumpGroup()
359 ErrorOr<const Elf_Shdr *> SymtabOrErr = Obj.getSection(Shdr->sh_link); in dumpGroup()
363 const Elf_Sym *symbol = Obj.getSymbol(Symtab, Shdr->sh_info); in dumpGroup()
368 auto sectionContents = Obj.getSectionContents(Shdr); in dumpGroup()
377 const long count = (Shdr->sh_size) / sizeof(Elf_Word); in dumpGroup()
398 ELFDumper<ELFT>::dumpMipsABIFlags(const Elf_Shdr *Shdr) { in dumpMipsABIFlags() argument
399 assert(Shdr->sh_type == ELF::SHT_MIPS_ABIFLAGS && in dumpMipsABIFlags()
402 if (std::error_code EC = dumpCommonSection(Shdr, *S)) in dumpMipsABIFlags()
405 ErrorOr<ArrayRef<uint8_t>> ContentOrErr = Obj.getSectionContents(Shdr); in dumpMipsABIFlags()