Lines Matching refs:Obj

29   MachODumper(const MachOObjectFile *Obj, ScopedPrinter &Writer)  in MachODumper()  argument
30 : ObjDumper(Writer, Obj->getFileName()), Obj(Obj) {} in MachODumper()
58 void printRelocation(const MachOObjectFile *Obj, const RelocationRef &Reloc);
60 void printSectionHeaders(const MachOObjectFile *Obj);
62 const MachOObjectFile *Obj; member in __anon79e53c010111::MachODumper
70 std::unique_ptr<ObjDumper> createMachODumper(const object::MachOObjectFile &Obj, in createMachODumper() argument
72 return std::make_unique<MachODumper>(&Obj, Writer); in createMachODumper()
328 static void getSection(const MachOObjectFile *Obj, in getSection() argument
331 if (!Obj->is64Bit()) { in getSection()
332 MachO::section Sect = Obj->getSection(Sec); in getSection()
344 MachO::section_64 Sect = Obj->getSection64(Sec); in getSection()
357 static void getSegment(const MachOObjectFile *Obj, in getSegment() argument
360 if (!Obj->is64Bit()) { in getSegment()
361 MachO::segment_command SC = Obj->getSegmentLoadCommand(L); in getSegment()
375 MachO::segment_command_64 SC = Obj->getSegment64LoadCommand(L); in getSegment()
389 static void getSymbol(const MachOObjectFile *Obj, in getSymbol() argument
392 if (!Obj->is64Bit()) { in getSymbol()
393 MachO::nlist Entry = Obj->getSymbolTableEntry(DRI); in getSymbol()
401 MachO::nlist_64 Entry = Obj->getSymbol64TableEntry(DRI); in getSymbol()
411 if (!Obj->is64Bit()) { in printFileHeaders()
412 printFileHeaders(Obj->getHeader()); in printFileHeaders()
414 printFileHeaders(Obj->getHeader64()); in printFileHeaders()
415 W.printHex("Reserved", Obj->getHeader64().reserved); in printFileHeaders()
453 void MachODumper::printSectionHeaders() { return printSectionHeaders(Obj); } in printSectionHeaders()
455 void MachODumper::printSectionHeaders(const MachOObjectFile *Obj) { in printSectionHeaders() argument
459 for (const SectionRef &Section : Obj->sections()) { in printSectionHeaders()
463 getSection(Obj, Section.getRawDataRefImpl(), MOSection); in printSectionHeaders()
465 StringRef Name = unwrapOrError(Obj->getFileName(), Section.getName()); in printSectionHeaders()
466 ArrayRef<char> RawName = Obj->getSectionRawName(DR); in printSectionHeaders()
467 StringRef SegmentName = Obj->getSectionFinalSegmentName(DR); in printSectionHeaders()
468 ArrayRef<char> RawSegmentName = Obj->getSectionRawFinalSegmentName(DR); in printSectionHeaders()
486 if (Obj->is64Bit()) in printSectionHeaders()
497 for (const SymbolRef &Symbol : Obj->symbols()) { in printSectionHeaders()
506 W.printBinaryBlock("SectionData", unwrapOrError(Obj->getFileName(), in printSectionHeaders()
515 for (const SectionRef &Section : Obj->sections()) { in printRelocations()
516 StringRef Name = unwrapOrError(Obj->getFileName(), Section.getName()); in printRelocations()
536 return printRelocation(Obj, Reloc); in printRelocation()
539 void MachODumper::printRelocation(const MachOObjectFile *Obj, in printRelocation() argument
546 MachO::any_relocation_info RE = Obj->getRelocation(DR); in printRelocation()
547 bool IsScattered = Obj->isRelocationScattered(RE); in printRelocation()
548 bool IsExtern = !IsScattered && Obj->getPlainRelocationExternal(RE); in printRelocation()
553 if (Symbol != Obj->symbol_end()) { in printRelocation()
556 reportError(TargetNameOrErr.takeError(), Obj->getFileName()); in printRelocation()
560 section_iterator SecI = Obj->getRelocationSection(DR); in printRelocation()
561 if (SecI != Obj->section_end()) in printRelocation()
562 TargetName = unwrapOrError(Obj->getFileName(), SecI->getName()); in printRelocation()
570 W.printNumber("PCRel", Obj->getAnyRelocationPCRel(RE)); in printRelocation()
571 W.printNumber("Length", Obj->getAnyRelocationLength(RE)); in printRelocation()
572 W.printNumber("Type", RelocName, Obj->getAnyRelocationType(RE)); in printRelocation()
574 W.printHex("Value", Obj->getScatteredRelocationValue(RE)); in printRelocation()
577 W.printNumber(Kind, TargetName, Obj->getPlainRelocationSymbolNum(RE)); in printRelocation()
584 SymbolNameOrOffset += utohexstr(Obj->getScatteredRelocationValue(RE)); in printRelocation()
591 << " " << Obj->getAnyRelocationPCRel(RE) in printRelocation()
592 << " " << Obj->getAnyRelocationLength(RE); in printRelocation()
596 OS << " " << Obj->getPlainRelocationExternal(RE); in printRelocation()
607 for (const SymbolRef &Symbol : Obj->symbols()) { in printSymbols()
626 getSymbol(Obj, Symbol.getRawDataRefImpl(), MOSymbol); in printSymbol()
637 reportError(SecIOrErr.takeError(), Obj->getFileName()); in printSymbol()
640 if (SecI != Obj->section_end()) in printSymbol()
641 SectionName = unwrapOrError(Obj->getFileName(), SecI->getName()); in printSymbol()
670 for (auto Sec : Obj->sections()) { in printStackMap()
687 unwrapOrError(Obj->getFileName(), StackMapSection.getContents()); in printStackMap()
691 if (Obj->isLittleEndian()) in printStackMap()
705 for (const auto &Command : Obj->load_commands()) { in printNeededLibraries()
712 MachO::dylib_command Dl = Obj->getDylibIDLoadCommand(Command); in printNeededLibraries()
728 for (const auto &Load : Obj->load_commands()) { in printMachODataInCode()
730 MachO::linkedit_data_command LLC = Obj->getLinkeditDataLoadCommand(Load); in printMachODataInCode()
737 MachO::data_in_code_entry DICE = Obj->getDataInCodeTableEntry( in printMachODataInCode()
750 for (const auto &Load : Obj->load_commands()) { in printMachOVersionMin()
775 MachO::build_version_command BVC = Obj->getBuildVersionLoadCommand(Load); in printMachOVersionMin()
788 MachO::version_min_command VMC = Obj->getVersionMinLoadCommand(Load); in printMachOVersionMin()
813 for (const auto &Load : Obj->load_commands()) { in printMachODysymtab()
815 MachO::dysymtab_command DLC = Obj->getDysymtabLoadCommand(); in printMachODysymtab()
840 for (const auto &Load : Obj->load_commands()) { in printMachOSegment()
843 getSegment(Obj, Load, MOSegment); in printMachOSegment()
861 for (const auto &Load : Obj->load_commands()) { in printMachOIndirectSymbols()
863 MachO::dysymtab_command DLC = Obj->getDysymtabLoadCommand(); in printMachOIndirectSymbols()
870 W.printHex("Symbol Index", Obj->getIndirectSymbolTableEntry(DLC, i)); in printMachOIndirectSymbols()
877 for (const auto &Load : Obj->load_commands()) { in printMachOLinkerOptions()
879 MachO::linker_option_command LOLC = Obj->getLinkerOptionLoadCommand(Load); in printMachOLinkerOptions()