[llvm-commits] CVS: llvm/lib/Support/DynamicLinker.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Oct 25 11:56:01 PDT 2003
Changes in directory llvm/lib/Support:
DynamicLinker.cpp updated: 1.2 -> 1.3
---
Log message:
Attempt to provide support for those without RTLD_DEFAULT.
---
Diffs of the changes: (+5 -0)
Index: llvm/lib/Support/DynamicLinker.cpp
diff -u llvm/lib/Support/DynamicLinker.cpp:1.2 llvm/lib/Support/DynamicLinker.cpp:1.3
--- llvm/lib/Support/DynamicLinker.cpp:1.2 Mon Oct 20 14:43:16 2003
+++ llvm/lib/Support/DynamicLinker.cpp Sat Oct 25 11:55:32 2003
@@ -37,7 +37,12 @@
void *GetAddressOfSymbol (const char *symbolName) {
#if defined (HAVE_DLOPEN)
+#ifdef RTLD_DEFAULT
return dlsym (RTLD_DEFAULT, symbolName);
+#else
+ static void* CurHandle = dlopen(0, RTLD_LAZY);
+ return dlsym(CurHandle, symbolName);
+#endif
#else
assert (0 && "Dynamic symbol lookup not implemented for this platform");
#endif
More information about the llvm-commits
mailing list