blob: 9b0e749aebacea407de3dc445804239b29fd483c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|