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