Lines Matching refs:JDS

338                   JITDylibState &JDS);
352 Error requestPushSymbols(JITDylibState &JDS,
359 lookupSymbols(JITDylibState &JDS, std::unique_lock<std::mutex> &JDStatesLock,
370 static Error registerObjCRegistrationObjects(JITDylibState &JDS);
372 JITDylibState &JDS);
376 JITDylibState &JDS);
378 JITDylibState &JDS, MachOJITDylibDepInfoMap &DepInfo);
382 JITDylibState &JDS);
515 auto &JDS = JDStates[Header]; in registerJITDylib() local
516 JDS.Name = std::move(Name); in registerJITDylib()
517 JDS.Header = Header; in registerJITDylib()
518 JDNameToHeader[JDS.Name] = Header; in registerJITDylib()
578 auto *JDS = getJITDylibStateByHeader(HeaderAddr.toPtr<void *>()); in registerObjectSymbolTable() local
579 if (!JDS) { in registerObjectSymbolTable()
588 JDS->SymbolTable[NameAddr.toPtr<const char *>()] = {SymAddr, Flags}; in registerObjectSymbolTable()
599 auto *JDS = getJITDylibStateByHeader(HeaderAddr.toPtr<void *>()); in deregisterObjectSymbolTable() local
600 if (!JDS) { in deregisterObjectSymbolTable()
609 JDS->SymbolTable.erase(NameAddr.toPtr<const char *>()); in deregisterObjectSymbolTable()
627 auto *JDS = getJITDylibStateByHeader(HeaderAddr.toPtr<void *>()); in registerObjectPlatformSections() local
628 if (!JDS) { in registerObjectPlatformSections()
648 JDS->UnwindSections.insert(CodeRange.Start.toPtr<char *>(), in registerObjectPlatformSections()
666 assert(!JDS->DataSectionContent.count(KV.second.Start.toPtr<char *>()) && in registerObjectPlatformSections()
669 JDS->DataSectionContent[KV.second.Start.toPtr<char *>()] = in registerObjectPlatformSections()
672 JDS->ZeroInitRanges[KV.second.Start.toPtr<char *>()] = KV.second.size(); in registerObjectPlatformSections()
677 JDS->ObjCRuntimeRegistrationObjects.add(KV.second.toSpan<char>()); in registerObjectPlatformSections()
679 JDS->ModInitsSections.add(KV.second.toSpan<void (*)()>()); in registerObjectPlatformSections()
704 auto *JDS = getJITDylibStateByHeader(HeaderAddr.toPtr<void *>()); in deregisterObjectPlatformSections() local
705 if (!JDS) { in deregisterObjectPlatformSections()
732 JDS->UnwindSections.erase(CodeRange.Start.toPtr<char *>(), in deregisterObjectPlatformSections()
750 JDS->DataSectionContent.erase(KV.second.Start.toPtr<char *>()); in deregisterObjectPlatformSections()
752 JDS->ZeroInitRanges.erase(KV.second.Start.toPtr<char *>()); in deregisterObjectPlatformSections()
758 JDS->ObjCRuntimeRegistrationObjects.removeIfPresent(KV.second); in deregisterObjectPlatformSections()
760 JDS->ModInitsSections.removeIfPresent(KV.second); in deregisterObjectPlatformSections()
791 auto *JDS = getJITDylibStateByHeader(DSOHandle); in dlclose()
793 if (JDS) { in dlclose()
811 auto *JDS = getJITDylibStateByHeader(DSOHandle); in dlsym() local
812 if (!JDS) { in dlsym()
823 if (auto Err = lookupSymbols(*JDS, Lock, {&Result, 1}, {&Lookup, 1})) { in dlsym()
839 auto *JDS = getJITDylibStateByHeader(DSOHandle); in registerAtExit() local
840 if (!JDS) { in registerAtExit()
848 JDS->AtExits.push_back({F, Arg}); in registerAtExit()
853 std::unique_lock<std::mutex> &JDStatesLock, JITDylibState &JDS) { in runAtExits() argument
854 auto AtExits = std::move(JDS.AtExits); in runAtExits()
869 auto *JDS = getJITDylibStateByHeader(DSOHandle); in runAtExits() local
875 if (JDS) in runAtExits()
876 runAtExits(Lock, *JDS); in runAtExits()
912 JITDylibState &JDS, span<std::pair<std::string_view, bool>> Symbols) { in requestPushSymbols() argument
917 ExecutorAddr::fromPtr(JDS.Header), Symbols)) { in requestPushSymbols()
925 JITDylibState &JDS, std::unique_lock<std::mutex> &JDStatesLock, in lookupSymbols() argument
936 auto I = JDS.SymbolTable.find(Symbols[Idx].first); in lookupSymbols()
937 if (I != JDS.SymbolTable.end()) in lookupSymbols()
960 JDS, {MissingSymbols.data(), MissingSymbols.size()})) in lookupSymbols()
967 auto I = JDS.SymbolTable.find(Symbols[MissingIdx].first); in lookupSymbols()
968 if (I != JDS.SymbolTable.end()) in lookupSymbols()
1062 JITDylibState &JDS) { in registerObjCRegistrationObjects() argument
1066 JDS.ObjCRuntimeRegistrationObjects.processNewSections( in registerObjCRegistrationObjects()
1089 std::unique_lock<std::mutex> &JDStatesLock, JITDylibState &JDS) { in runModInits() argument
1091 InitSections.reserve(JDS.ModInitsSections.numNewSections()); in runModInits()
1097 JDS.ModInitsSections.processNewSections( in runModInits()
1114 auto *JDS = getJITDylibStateByName(Path); in dlopenImpl() local
1116 if (!JDS) in dlopenImpl()
1123 if (!JDS->referenced() || !JDS->Sealed) { in dlopenImpl()
1124 if (auto Err = dlopenFull(Lock, *JDS)) in dlopenImpl()
1129 ++JDS->DlRefCount; in dlopenImpl()
1132 return JDS->Header; in dlopenImpl()
1136 std::unique_lock<std::mutex> &JDStatesLock, JITDylibState &JDS) { in dlopenFull() argument
1143 DepInfo, ExecutorAddr::fromPtr(JDS.Header))) in dlopenFull()
1150 if (auto Err = dlopenInitialize(JDStatesLock, JDS, *DepInfo)) in dlopenFull()
1156 JDS.Name.c_str()); in dlopenFull()
1161 << JDS.Name; in dlopenFull()
1169 std::unique_lock<std::mutex> &JDStatesLock, JITDylibState &JDS, in dlopenInitialize() argument
1173 JDS.Name.c_str()); in dlopenInitialize()
1181 auto I = DepInfo.find(ExecutorAddr::fromPtr(JDS.Header)); in dlopenInitialize()
1190 if (JDS.Sealed) { in dlopenInitialize()
1193 ErrStream << "Sealed JITDylib " << JDS.Header in dlopenInitialize()
1197 if (JDS.referenced()) in dlopenInitialize()
1200 JDS.Sealed = DI.Sealed; in dlopenInitialize()
1204 std::swap(JDS.Deps, OldDeps); in dlopenInitialize()
1205 JDS.Deps.reserve(DI.DepHeaders.size()); in dlopenInitialize()
1212 << JDS.Name; in dlopenInitialize()
1221 if (auto Err = registerObjCRegistrationObjects(JDS)) in dlopenInitialize()
1223 if (auto Err = runModInits(JDStatesLock, JDS)) in dlopenInitialize()
1243 auto *JDS = getJITDylibStateByHeader(DSOHandle); in dlcloseImpl() local
1245 if (!JDS) { in dlcloseImpl()
1252 --JDS->DlRefCount; in dlcloseImpl()
1254 if (!JDS->referenced()) in dlcloseImpl()
1255 return dlcloseDeinitialize(Lock, *JDS); in dlcloseImpl()
1261 std::unique_lock<std::mutex> &JDStatesLock, JITDylibState &JDS) { in dlcloseDeinitialize() argument
1265 JDS.Name.c_str()); in dlcloseDeinitialize()
1268 runAtExits(JDStatesLock, JDS); in dlcloseDeinitialize()
1271 JDS.ModInitsSections.reset(); in dlcloseDeinitialize()
1274 for (auto &KV : JDS.DataSectionContent) in dlcloseDeinitialize()
1276 for (auto &KV : JDS.ZeroInitRanges) in dlcloseDeinitialize()
1280 for (auto *DepJDS : JDS.Deps) { in dlcloseDeinitialize()