Lines Matching refs:Obj

326 static const Target *getTarget(const ObjectFile *Obj = nullptr) {  in getTarget()  argument
330 if (Obj) { in getTarget()
331 TheTriple.setArch(Triple::ArchType(Obj->getArch())); in getTarget()
334 if (Obj->isMachO()) in getTarget()
337 if (Obj->isCOFF()) { in getTarget()
338 const auto COFFObj = dyn_cast<COFFObjectFile>(Obj); in getTarget()
487 static std::error_code getRelocationValueString(const ELFObjectFile<ELFT> *Obj, in getRelocationValueString() argument
496 const ELFFile<ELFT> &EF = *Obj->getELFFile(); in getRelocationValueString()
526 const Elf_Rela *ERela = Obj->getRela(Rel); in getRelocationValueString()
532 const Elf_Sym *symb = Obj->getSymbol(SI->getRawDataRefImpl()); in getRelocationValueString()
538 const Elf_Shdr *SymSec = Obj->getSection((*SymSI)->getRawDataRefImpl()); in getRelocationValueString()
619 static std::error_code getRelocationValueString(const ELFObjectFileBase *Obj, in getRelocationValueString() argument
622 if (auto *ELF32LE = dyn_cast<ELF32LEObjectFile>(Obj)) in getRelocationValueString()
624 if (auto *ELF64LE = dyn_cast<ELF64LEObjectFile>(Obj)) in getRelocationValueString()
626 if (auto *ELF32BE = dyn_cast<ELF32BEObjectFile>(Obj)) in getRelocationValueString()
628 auto *ELF64BE = cast<ELF64BEObjectFile>(Obj); in getRelocationValueString()
632 static std::error_code getRelocationValueString(const COFFObjectFile *Obj, in getRelocationValueString() argument
719 static std::error_code getRelocationValueString(const MachOObjectFile *Obj, in getRelocationValueString() argument
723 MachO::any_relocation_info RE = Obj->getRelocation(Rel); in getRelocationValueString()
725 unsigned Arch = Obj->getArch(); in getRelocationValueString()
729 unsigned Type = Obj->getAnyRelocationType(RE); in getRelocationValueString()
730 bool IsPCRel = Obj->getAnyRelocationPCRel(RE); in getRelocationValueString()
737 bool isPCRel = Obj->getAnyRelocationPCRel(RE); in getRelocationValueString()
742 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
750 Obj->moveRelocationNext(RelNext); in getRelocationValueString()
751 MachO::any_relocation_info RENext = Obj->getRelocation(RelNext); in getRelocationValueString()
756 unsigned RType = Obj->getAnyRelocationType(RENext); in getRelocationValueString()
763 printRelocationTargetName(Obj, RENext, fmt); in getRelocationValueString()
765 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
769 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
775 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
779 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
783 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
787 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
799 Obj->moveRelocationNext(RelNext); in getRelocationValueString()
800 MachO::any_relocation_info RENext = Obj->getRelocation(RelNext); in getRelocationValueString()
804 unsigned RType = Obj->getAnyRelocationType(RENext); in getRelocationValueString()
810 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
812 printRelocationTargetName(Obj, RENext, fmt); in getRelocationValueString()
821 Obj->moveRelocationNext(RelNext); in getRelocationValueString()
822 MachO::any_relocation_info RENext = Obj->getRelocation(RelNext); in getRelocationValueString()
826 unsigned RType = Obj->getAnyRelocationType(RENext); in getRelocationValueString()
831 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
833 printRelocationTargetName(Obj, RENext, fmt); in getRelocationValueString()
837 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
844 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
852 bool isUpper = Obj->getAnyRelocationLength(RE) >> 1; in getRelocationValueString()
858 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
861 Obj->moveRelocationNext(RelNext); in getRelocationValueString()
862 MachO::any_relocation_info RENext = Obj->getRelocation(RelNext); in getRelocationValueString()
866 unsigned RType = Obj->getAnyRelocationType(RENext); in getRelocationValueString()
880 printRelocationTargetName(Obj, RENext, fmt); in getRelocationValueString()
886 default: { printRelocationTargetName(Obj, RE, fmt); } in getRelocationValueString()
890 printRelocationTargetName(Obj, RE, fmt); in getRelocationValueString()
899 const ObjectFile *Obj = Rel.getObject(); in getRelocationValueString() local
900 if (auto *ELF = dyn_cast<ELFObjectFileBase>(Obj)) in getRelocationValueString()
902 if (auto *COFF = dyn_cast<COFFObjectFile>(Obj)) in getRelocationValueString()
904 auto *MachO = cast<MachOObjectFile>(Obj); in getRelocationValueString()
912 const ObjectFile *Obj = RelRef.getObject(); in getHidden() local
913 auto *MachO = dyn_cast<MachOObjectFile>(Obj); in getHidden()
941 static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { in DisassembleObject() argument
942 const Target *TheTarget = getTarget(Obj); in DisassembleObject()
945 SubtargetFeatures Features = Obj->getFeatures(); in DisassembleObject()
988 StringRef Fmt = Obj->getBytesInAddress() > 4 ? "\t\t%016" PRIx64 ": " : in DisassembleObject()
995 for (const SectionRef &Section : ToolSectionFilter(*Obj)) { in DisassembleObject()
997 if (Sec2 != Obj->section_end()) in DisassembleObject()
1005 for (const SymbolRef &Symbol : Obj->symbols()) { in DisassembleObject()
1018 if (SecI == Obj->section_end()) in DisassembleObject()
1026 for (SectionRef Sec : Obj->sections()) in DisassembleObject()
1032 if (const auto *COFFObj = dyn_cast<COFFObjectFile>(Obj)) { in DisassembleObject()
1062 for (const SectionRef &Section : ToolSectionFilter(*Obj)) { in DisassembleObject()
1075 if (Obj->isELF() && Obj->getArch() == Triple::aarch64) { in DisassembleObject()
1103 if (const MachOObjectFile *MachO = dyn_cast<const MachOObjectFile>(Obj)) { in DisassembleObject()
1146 if (Obj->isELF() && Obj->getArch() == Triple::amdgcn) { in DisassembleObject()
1172 if (Obj->isELF() && Obj->getArch() == Triple::aarch64) { in DisassembleObject()
1233 if (!Obj->isRelocatableObject()) { in DisassembleObject()
1297 void llvm::PrintRelocations(const ObjectFile *Obj) { in PrintRelocations() argument
1298 StringRef Fmt = Obj->getBytesInAddress() > 4 ? "%016" PRIx64 : in PrintRelocations()
1302 if (!Obj->isRelocatableObject()) in PrintRelocations()
1305 for (const SectionRef &Section : ToolSectionFilter(*Obj)) { in PrintRelocations()
1327 void llvm::PrintSectionHeaders(const ObjectFile *Obj) { in PrintSectionHeaders() argument
1331 for (const SectionRef &Section : ToolSectionFilter(*Obj)) { in PrintSectionHeaders()
1347 void llvm::PrintSectionContents(const ObjectFile *Obj) { in PrintSectionContents() argument
1349 for (const SectionRef &Section : ToolSectionFilter(*Obj)) { in PrintSectionContents()
1560 void llvm::printRawClangAST(const ObjectFile *Obj) { in printRawClangAST() argument
1570 if (isa<COFFObjectFile>(Obj)) { in printRawClangAST()
1575 for (auto Sec : ToolSectionFilter(*Obj)) { in printRawClangAST()
1591 static void printFaultMaps(const ObjectFile *Obj) { in printFaultMaps() argument
1594 if (isa<ELFObjectFileBase>(Obj)) { in printFaultMaps()
1596 } else if (isa<MachOObjectFile>(Obj)) { in printFaultMaps()
1606 for (auto Sec : ToolSectionFilter(*Obj)) { in printFaultMaps()