aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-10-10 16:55:42 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-10-10 16:55:42 +0000
commitf212e472710f8799810d188c174b5b5cc5dcf7b0 (patch)
tree2a282b3e89d1a51021c9f7336e5e0181f7df645b /include/llvm
parentbd2531f8a607bd297fd915eea45376b0b972d96e (diff)
downloadexternal_llvm-f212e472710f8799810d188c174b5b5cc5dcf7b0.zip
external_llvm-f212e472710f8799810d188c174b5b5cc5dcf7b0.tar.gz
external_llvm-f212e472710f8799810d188c174b5b5cc5dcf7b0.tar.bz2
Add my abstracted dynamic linker support files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Support/DynamicLinker.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/llvm/Support/DynamicLinker.h b/include/llvm/Support/DynamicLinker.h
new file mode 100644
index 0000000..9b0e749
--- /dev/null
+++ b/include/llvm/Support/DynamicLinker.h
@@ -0,0 +1,29 @@
+//===-- DynamicLinker.h - System-indep. DynamicLinker interface -*- C++ -*-===//
+//
+// Lightweight interface to dynamic library linking and loading, and dynamic
+// symbol lookup functionality, in whatever form the operating system
+// provides it.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SUPPORT_DYNAMICLINKER_H
+#define SUPPORT_DYNAMICLINKER_H
+
+#include <string>
+
+/// LinkDynamicObject - Load the named file as a dynamic library
+/// and link it with the currently running process. Returns false
+/// on success, true if there is an error (and sets ErrorMessage
+/// if it is not NULL). Analogous to dlopen().
+///
+bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
+
+/// GetAddressOfSymbol - Returns the address of the named symbol in
+/// the currently running process, as reported by the dynamic linker,
+/// or NULL if the symbol does not exist or some other error has
+/// occurred.
+///
+void *GetAddressOfSymbol (const char *symbolName);
+void *GetAddressOfSymbol (const std::string &symbolName);
+
+#endif // SUPPORT_DYNAMICLINKER_H