Lines Matching refs:Obj

31   MachODumper(const MachOObjectFile *Obj, ScopedPrinter &Writer)  in MachODumper()  argument
32 : ObjDumper(Writer, Obj->getFileName()), Obj(Obj) {} in MachODumper()
72 void printRelocation(const MachOObjectFile *Obj, const RelocationRef &Reloc);
74 void printSectionHeaders(const MachOObjectFile *Obj);
76 const MachOObjectFile *Obj; member in __anoncc82347d0111::MachODumper
84 std::unique_ptr<ObjDumper> createMachODumper(const object::MachOObjectFile &Obj, in createMachODumper() argument
86 return std::make_unique<MachODumper>(&Obj, Writer); in createMachODumper()
342 static void getSection(const MachOObjectFile *Obj, in getSection() argument
345 if (!Obj->is64Bit()) { in getSection()
346 MachO::section Sect = Obj->getSection(Sec); in getSection()
358 MachO::section_64 Sect = Obj->getSection64(Sec); in getSection()
371 static void getSegment(const MachOObjectFile *Obj, in getSegment() argument
374 if (!Obj->is64Bit()) { in getSegment()
375 MachO::segment_command SC = Obj->getSegmentLoadCommand(L); in getSegment()
389 MachO::segment_command_64 SC = Obj->getSegment64LoadCommand(L); in getSegment()
403 static void getSymbol(const MachOObjectFile *Obj, in getSymbol() argument
406 if (!Obj->is64Bit()) { in getSymbol()
407 MachO::nlist Entry = Obj->getSymbolTableEntry(DRI); in getSymbol()
415 MachO::nlist_64 Entry = Obj->getSymbol64TableEntry(DRI); in getSymbol()
425 if (!Obj->is64Bit()) { in printFileHeaders()
426 printFileHeaders(Obj->getHeader()); in printFileHeaders()
428 printFileHeaders(Obj->getHeader64()); in printFileHeaders()
429 W.printHex("Reserved", Obj->getHeader64().reserved); in printFileHeaders()
467 void MachODumper::printSectionHeaders() { return printSectionHeaders(Obj); } in printSectionHeaders()
469 void MachODumper::printSectionHeaders(const MachOObjectFile *Obj) { in printSectionHeaders() argument
473 for (const SectionRef &Section : Obj->sections()) { in printSectionHeaders()
477 getSection(Obj, Section.getRawDataRefImpl(), MOSection); in printSectionHeaders()
479 StringRef Name = unwrapOrError(Obj->getFileName(), Section.getName()); in printSectionHeaders()
480 ArrayRef<char> RawName = Obj->getSectionRawName(DR); in printSectionHeaders()
481 StringRef SegmentName = Obj->getSectionFinalSegmentName(DR); in printSectionHeaders()
482 ArrayRef<char> RawSegmentName = Obj->getSectionRawFinalSegmentName(DR); in printSectionHeaders()
500 if (Obj->is64Bit()) in printSectionHeaders()
511 for (const SymbolRef &Symbol : Obj->symbols()) { in printSectionHeaders()
520 W.printBinaryBlock("SectionData", unwrapOrError(Obj->getFileName(), in printSectionHeaders()
529 for (const SectionRef &Section : Obj->sections()) { in printRelocations()
530 StringRef Name = unwrapOrError(Obj->getFileName(), Section.getName()); in printRelocations()
550 return printRelocation(Obj, Reloc); in printRelocation()
553 void MachODumper::printRelocation(const MachOObjectFile *Obj, in printRelocation() argument
560 MachO::any_relocation_info RE = Obj->getRelocation(DR); in printRelocation()
561 bool IsScattered = Obj->isRelocationScattered(RE); in printRelocation()
562 bool IsExtern = !IsScattered && Obj->getPlainRelocationExternal(RE); in printRelocation()
567 if (Symbol != Obj->symbol_end()) { in printRelocation()
571 section_iterator SecI = Obj->getRelocationSection(DR); in printRelocation()
572 if (SecI != Obj->section_end()) in printRelocation()
573 TargetName = unwrapOrError(Obj->getFileName(), SecI->getName()); in printRelocation()
581 W.printNumber("PCRel", Obj->getAnyRelocationPCRel(RE)); in printRelocation()
582 W.printNumber("Length", Obj->getAnyRelocationLength(RE)); in printRelocation()
583 W.printNumber("Type", RelocName, Obj->getAnyRelocationType(RE)); in printRelocation()
585 W.printHex("Value", Obj->getScatteredRelocationValue(RE)); in printRelocation()
588 W.printNumber(Kind, TargetName, Obj->getPlainRelocationSymbolNum(RE)); in printRelocation()
595 SymbolNameOrOffset += utohexstr(Obj->getScatteredRelocationValue(RE)); in printRelocation()
602 << " " << Obj->getAnyRelocationPCRel(RE) in printRelocation()
603 << " " << Obj->getAnyRelocationLength(RE); in printRelocation()
607 OS << " " << Obj->getPlainRelocationExternal(RE); in printRelocation()
618 reportError(SymbolNameOrErr.takeError(), Obj->getFileName()); in getSymbolName()
624 return Obj->is64Bit() in getSymbolType()
625 ? Obj->getSymbol64TableEntry(Symbol.getRawDataRefImpl()).n_type in getSymbolType()
626 : Obj->getSymbolTableEntry(Symbol.getRawDataRefImpl()).n_type; in getSymbolType()
642 auto SymbolRange = Obj->symbols(); in printSymbols()
649 for (const SymbolRef &Symbol : Obj->symbols()) { in printSymbols()
670 getSymbol(Obj, Symbol.getRawDataRefImpl(), MOSymbol); in printSymbol()
681 reportError(SecIOrErr.takeError(), Obj->getFileName()); in printSymbol()
684 if (SecI != Obj->section_end()) in printSymbol()
685 SectionName = unwrapOrError(Obj->getFileName(), SecI->getName()); in printSymbol()
714 for (auto Sec : Obj->sections()) { in printStackMap()
731 unwrapOrError(Obj->getFileName(), StackMapSection.getContents()); in printStackMap()
735 if (Obj->isLittleEndian()) in printStackMap()
745 for (auto Sec : Obj->sections()) { in printCGProfile()
761 unwrapOrError(Obj->getFileName(), CGProfileSection.getContents()); in printCGProfile()
762 BinaryStreamReader Reader(CGProfileContents, Obj->isLittleEndian() in printCGProfile()
771 reportError(std::move(Err), Obj->getFileName()); in printCGProfile()
773 reportError(std::move(Err), Obj->getFileName()); in printCGProfile()
775 reportError(std::move(Err), Obj->getFileName()); in printCGProfile()
777 W.printNumber("From", getSymbolName(*Obj->getSymbolByIndex(FromIndex)), in printCGProfile()
779 W.printNumber("To", getSymbolName(*Obj->getSymbolByIndex(ToIndex)), in printCGProfile()
791 for (const auto &Command : Obj->load_commands()) { in printNeededLibraries()
798 MachO::dylib_command Dl = Obj->getDylibIDLoadCommand(Command); in printNeededLibraries()
814 for (const auto &Load : Obj->load_commands()) { in printMachODataInCode()
816 MachO::linkedit_data_command LLC = Obj->getLinkeditDataLoadCommand(Load); in printMachODataInCode()
823 MachO::data_in_code_entry DICE = Obj->getDataInCodeTableEntry( in printMachODataInCode()
836 for (const auto &Load : Obj->load_commands()) { in printMachOVersionMin()
861 MachO::build_version_command BVC = Obj->getBuildVersionLoadCommand(Load); in printMachOVersionMin()
874 MachO::version_min_command VMC = Obj->getVersionMinLoadCommand(Load); in printMachOVersionMin()
899 for (const auto &Load : Obj->load_commands()) { in printMachODysymtab()
901 MachO::dysymtab_command DLC = Obj->getDysymtabLoadCommand(); in printMachODysymtab()
926 for (const auto &Load : Obj->load_commands()) { in printMachOSegment()
929 getSegment(Obj, Load, MOSegment); in printMachOSegment()
947 for (const auto &Load : Obj->load_commands()) { in printMachOIndirectSymbols()
949 MachO::dysymtab_command DLC = Obj->getDysymtabLoadCommand(); in printMachOIndirectSymbols()
956 W.printHex("Symbol Index", Obj->getIndirectSymbolTableEntry(DLC, i)); in printMachOIndirectSymbols()
963 for (const auto &Load : Obj->load_commands()) { in printMachOLinkerOptions()
965 MachO::linker_option_command LOLC = Obj->getLinkerOptionLoadCommand(Load); in printMachOLinkerOptions()