Lines Matching refs:Obj

30   MachODumper(const MachOObjectFile *Obj, StreamWriter& Writer)
32 , Obj(Obj) { }
46 void printRelocation(const MachOObjectFile *Obj, const RelocationRef &Reloc);
48 void printSections(const MachOObjectFile *Obj);
50 const MachOObjectFile *Obj;
58 std::error_code createMachODumper(const object::ObjectFile *Obj,
61 const MachOObjectFile *MachOObj = dyn_cast<MachOObjectFile>(Obj);
158 static void getSection(const MachOObjectFile *Obj,
161 if (!Obj->is64Bit()) {
162 MachO::section Sect = Obj->getSection(Sec);
174 MachO::section_64 Sect = Obj->getSection64(Sec);
187 static void getSymbol(const MachOObjectFile *Obj,
190 if (!Obj->is64Bit()) {
191 MachO::nlist Entry = Obj->getSymbolTableEntry(DRI);
199 MachO::nlist_64 Entry = Obj->getSymbol64TableEntry(DRI);
212 return printSections(Obj);
215 void MachODumper::printSections(const MachOObjectFile *Obj) {
219 for (const SectionRef &Section : Obj->sections()) {
223 getSection(Obj, Section.getRawDataRefImpl(), MOSection);
230 ArrayRef<char> RawName = Obj->getSectionRawName(DR);
231 StringRef SegmentName = Obj->getSectionFinalSegmentName(DR);
232 ArrayRef<char> RawSegmentName = Obj->getSectionRawFinalSegmentName(DR);
259 for (const SymbolRef &Symbol : Obj->symbols()) {
282 for (const SectionRef &Section : Obj->sections()) {
306 return printRelocation(Obj, Reloc);
309 void MachODumper::printRelocation(const MachOObjectFile *Obj,
319 MachO::any_relocation_info RE = Obj->getRelocation(DR);
320 bool IsScattered = Obj->isRelocationScattered(RE);
325 SymbolNameOrOffset += utohexstr(Obj->getScatteredRelocationValue(RE));
328 if (Symbol != Obj->symbol_end()) {
334 SymbolNameOrOffset += utohexstr(Obj->getPlainRelocationSymbolNum(RE));
340 W.printNumber("PCRel", Obj->getAnyRelocationPCRel(RE));
341 W.printNumber("Length", Obj->getAnyRelocationLength(RE));
345 W.printNumber("Extern", Obj->getPlainRelocationExternal(RE));
346 W.printNumber("Type", RelocName, Obj->getAnyRelocationType(RE));
352 << " " << Obj->getAnyRelocationPCRel(RE)
353 << " " << Obj->getAnyRelocationLength(RE);
357 OS << " " << Obj->getPlainRelocationExternal(RE);
368 for (const SymbolRef &Symbol : Obj->symbols()) {
383 getSymbol(Obj, Symbol.getRawDataRefImpl(), MOSymbol);
386 section_iterator SecI(Obj->section_begin());
387 if (!error(Symbol.getSection(SecI)) && SecI != Obj->section_end())