[llvm-commits] CVS: llvm/include/Support/DynamicLinker.h
Brian Gaeke
gaeke at cs.uiuc.edu
Fri Oct 10 11:56:01 PDT 2003
Changes in directory llvm/include/Support:
DynamicLinker.h added (r1.1)
---
Log message:
Add my abstracted dynamic linker support files.
---
Diffs of the changes: (+29 -0)
Index: llvm/include/Support/DynamicLinker.h
diff -c /dev/null llvm/include/Support/DynamicLinker.h:1.1
*** /dev/null Fri Oct 10 11:55:51 2003
--- llvm/include/Support/DynamicLinker.h Fri Oct 10 11:55:40 2003
***************
*** 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
More information about the llvm-commits
mailing list