[llvm] [Offload] Try loading dynamic libraries at global scope first (PR #227020)
Alex Duran via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 08:45:59 PDT 2026
================
@@ -178,16 +204,11 @@ static bool loadLevelZero() {
return false;
}
- for (size_t I = 0; I < dlwrap::size(); I++) {
- const char *Sym = dlwrap::symbol(I);
-
- void *P = DynlibHandle->getAddressOfSymbol(Sym);
- if (P)
- ODBG(OLDT_Init) << "Implementing " << Sym << " with dlsym(" << Sym
- << ") -> " << P;
- *dlwrap::pointer(I) = P;
- }
-
+#ifdef _WIN32
+ resolveSymbols(*DynlibHandle);
+#else
+ resolveSymbols(Process);
----------------
adurang wrote:
Shouldn't this be DynlibHandle in both cases? (i.e., no #ifdef). Otherwise we seem to loading from the process twice in Linux.
https://github.com/llvm/llvm-project/pull/227020
More information about the llvm-commits
mailing list