1 //===-- DynamicLinker.h - System-indep. DynamicLinker interface -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Lightweight interface to dynamic library linking and loading, and dynamic
11 // symbol lookup functionality, in whatever form the operating system
14 //===----------------------------------------------------------------------===//
16 #ifndef SUPPORT_DYNAMICLINKER_H
17 #define SUPPORT_DYNAMICLINKER_H
21 /// LinkDynamicObject - Load the named file as a dynamic library
22 /// and link it with the currently running process. Returns false
23 /// on success, true if there is an error (and sets ErrorMessage
24 /// if it is not NULL). Analogous to dlopen().
26 bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
28 /// GetAddressOfSymbol - Returns the address of the named symbol in
29 /// the currently running process, as reported by the dynamic linker,
30 /// or NULL if the symbol does not exist or some other error has
33 void *GetAddressOfSymbol (const char *symbolName);
34 void *GetAddressOfSymbol (const std::string &symbolName);
36 #endif // SUPPORT_DYNAMICLINKER_H