Lines Matching refs:Obj

266 static char isSymbolList64Bit(SymbolicFile &Obj) {  in isSymbolList64Bit()  argument
267 if (isa<IRObjectFile>(Obj)) { in isSymbolList64Bit()
268 IRObjectFile *IRobj = dyn_cast<IRObjectFile>(&Obj); in isSymbolList64Bit()
275 if (isa<COFFObjectFile>(Obj)) in isSymbolList64Bit()
277 if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj)) in isSymbolList64Bit()
279 return cast<ELFObjectFileBase>(Obj).getBytesInAddress() == 8; in isSymbolList64Bit()
286 static char getSymbolNMTypeChar(IRObjectFile &Obj, basic_symbol_iterator I);
293 static void darwinPrintSymbol(SymbolicFile &Obj, SymbolListT::iterator I, in darwinPrintSymbol() argument
305 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj); in darwinPrintSymbol()
306 if (Obj.isIR()) { in darwinPrintSymbol()
322 IRObjectFile *IRobj = dyn_cast<IRObjectFile>(&Obj); in darwinPrintSymbol()
373 if (Obj.isIR() && (NType & MachO::N_TYPE) == MachO::N_TYPE) in darwinPrintSymbol()
409 if (Obj.isIR()) { in darwinPrintSymbol()
599 static void sortAndPrintSymbolList(SymbolicFile &Obj, bool printName, in sortAndPrintSymbolList() argument
629 if (isSymbolList64Bit(Obj)) { in sortAndPrintSymbolList()
676 if ((JustSymbolName || (UndefinedOnly && isa<MachOObjectFile>(Obj) && in sortAndPrintSymbolList()
696 if (Obj.isIR()) in sortAndPrintSymbolList()
709 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj); in sortAndPrintSymbolList()
710 if ((OutputFormat == darwin || FormatMachOasHex) && (MachO || Obj.isIR())) { in sortAndPrintSymbolList()
711 darwinPrintSymbol(Obj, I, SymbolAddrStr, printBlanks, printDashes, in sortAndPrintSymbolList()
742 static char getSymbolNMTypeChar(ELFObjectFileBase &Obj, in getSymbolNMTypeChar() argument
754 if (SecI != Obj.section_end()) { in getSymbolNMTypeChar()
790 static char getSymbolNMTypeChar(COFFObjectFile &Obj, symbol_iterator I) { in getSymbolNMTypeChar() argument
791 COFFSymbolRef Symb = Obj.getCOFFSymbol(*I); in getSymbolNMTypeChar()
817 const coff_section *Section = Obj.getCOFFSection(*SecI); in getSymbolNMTypeChar()
842 static char getSymbolNMTypeChar(MachOObjectFile &Obj, basic_symbol_iterator I) { in getSymbolNMTypeChar() argument
844 uint8_t NType = Obj.is64Bit() ? Obj.getSymbol64TableEntry(Symb).n_type in getSymbolNMTypeChar()
845 : Obj.getSymbolTableEntry(Symb).n_type; in getSymbolNMTypeChar()
856 Expected<section_iterator> SecOrErr = Obj.getSymbolSection(Symb); in getSymbolNMTypeChar()
864 Obj.getSectionName(Ref, SectionName); in getSymbolNMTypeChar()
865 StringRef SegmentName = Obj.getSectionFinalSegmentName(Ref); in getSymbolNMTypeChar()
885 static char getSymbolNMTypeChar(IRObjectFile &Obj, basic_symbol_iterator I) { in getSymbolNMTypeChar() argument
886 const GlobalValue *GV = Obj.getSymbolGV(I->getRawDataRefImpl()); in getSymbolNMTypeChar()
890 static bool isObject(SymbolicFile &Obj, basic_symbol_iterator I) { in isObject() argument
891 return !dyn_cast<ELFObjectFileBase>(&Obj) in isObject()
896 static char getNMTypeChar(SymbolicFile &Obj, basic_symbol_iterator I) { in getNMTypeChar() argument
898 if ((Symflags & object::SymbolRef::SF_Weak) && !isa<MachOObjectFile>(Obj)) { in getNMTypeChar()
899 char Ret = isObject(Obj, I) ? 'v' : 'w'; in getNMTypeChar()
912 else if (IRObjectFile *IR = dyn_cast<IRObjectFile>(&Obj)) { in getNMTypeChar()
918 else if (COFFObjectFile *COFF = dyn_cast<COFFObjectFile>(&Obj)) in getNMTypeChar()
920 else if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj)) in getNMTypeChar()
923 Ret = getSymbolNMTypeChar(cast<ELFObjectFileBase>(Obj), I); in getNMTypeChar()
937 static unsigned getNsectForSegSect(MachOObjectFile *Obj) { in getNsectForSegSect() argument
939 for (auto &S : Obj->sections()) { in getNsectForSegSect()
942 Obj->getSectionName(Ref, SectionName); in getNsectForSegSect()
943 StringRef SegmentName = Obj->getSectionFinalSegmentName(Ref); in getNsectForSegSect()
956 static unsigned getNsectInMachO(MachOObjectFile &Obj, BasicSymbolRef Sym) { in getNsectInMachO() argument
958 if (Obj.is64Bit()) { in getNsectInMachO()
959 MachO::nlist_64 STE = Obj.getSymbol64TableEntry(Symb); in getNsectInMachO()
962 MachO::nlist STE = Obj.getSymbolTableEntry(Symb); in getNsectInMachO()
967 dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName, in dumpSymbolNamesFromObject() argument
970 auto Symbols = Obj.symbols(); in dumpSymbolNamesFromObject()
972 const auto *E = dyn_cast<ELFObjectFileBase>(&Obj); in dumpSymbolNamesFromObject()
974 error("File format has no dynamic symbol table", Obj.getFileName()); in dumpSymbolNamesFromObject()
986 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj); in dumpSymbolNamesFromObject()
998 if (IRObjectFile *IR = dyn_cast<IRObjectFile>(&Obj)) { in dumpSymbolNamesFromObject()
1013 if (isa<ELFObjectFileBase>(&Obj)) in dumpSymbolNamesFromObject()
1016 if (PrintAddress && isa<ObjectFile>(Obj)) { in dumpSymbolNamesFromObject()
1025 S.TypeChar = getNMTypeChar(Obj, Sym); in dumpSymbolNamesFromObject()
1043 CurrentFilename = Obj.getFileName(); in dumpSymbolNamesFromObject()
1044 sortAndPrintSymbolList(Obj, printName, ArchiveName, ArchitectureName); in dumpSymbolNamesFromObject()
1159 ObjectFile &Obj = *ObjOrErr.get(); in dumpSymbolNamesFromFile() local
1164 outs() << "\n" << Obj.getFileName() << " (for architecture " in dumpSymbolNamesFromFile()
1168 dumpSymbolNamesFromObject(Obj, false, ArchiveName, in dumpSymbolNamesFromFile()
1240 ObjectFile &Obj = *ObjOrErr.get(); in dumpSymbolNamesFromFile() local
1241 dumpSymbolNamesFromObject(Obj, false); in dumpSymbolNamesFromFile()
1295 ObjectFile &Obj = *ObjOrErr.get(); in dumpSymbolNamesFromFile() local
1297 if (isa<MachOObjectFile>(Obj) && moreThanOneArch) in dumpSymbolNamesFromFile()
1302 outs() << Obj.getFileName(); in dumpSymbolNamesFromFile()
1303 if (isa<MachOObjectFile>(Obj) && moreThanOneArch) in dumpSymbolNamesFromFile()
1307 dumpSymbolNamesFromObject(Obj, false, ArchiveName, ArchitectureName); in dumpSymbolNamesFromFile()