1
//===-- llvm/Support/DynamicLinker.h - Portable Dynamic Linker --*- C++ -*-===//
3
// The LLVM Compiler Infrastructure
5
// This file is distributed under the University of Illinois Open Source
6
// 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 LLVM_SUPPORT_DYNAMICLINKER_H
17
#define LLVM_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