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
23 /// LinkDynamicObject - Load the named file as a dynamic library
24 /// and link it with the currently running process. Returns false
25 /// on success, true if there is an error (and sets ErrorMessage
26 /// if it is not NULL). Analogous to dlopen().
28 bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
30 /// GetAddressOfSymbol - Returns the address of the named symbol in
31 /// the currently running process, as reported by the dynamic linker,
32 /// or NULL if the symbol does not exist or some other error has
35 void *GetAddressOfSymbol (const char *symbolName);
36 void *GetAddressOfSymbol (const std::string &symbolName);
38 } // End llvm namespace
40 #endif // SUPPORT_DYNAMICLINKER_H