Added LLVM notice.
[oota-llvm.git] / include / llvm / Support / DynamicLinker.h
1 //===-- DynamicLinker.h - System-indep. DynamicLinker interface -*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
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.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // Lightweight interface to dynamic library linking and loading, and dynamic
11 // symbol lookup functionality, in whatever form the operating system
12 // provides it.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef SUPPORT_DYNAMICLINKER_H
17 #define SUPPORT_DYNAMICLINKER_H
18
19 #include <string>
20
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().
25 ///
26 bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
27
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
31 /// occurred.
32 /// 
33 void *GetAddressOfSymbol (const char *symbolName);
34 void *GetAddressOfSymbol (const std::string &symbolName);
35
36 #endif // SUPPORT_DYNAMICLINKER_H