LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DynamicLinker.h

Go to the documentation of this file.
00001 //===-- llvm/Support/DynamicLinker.h - Portable Dynamic Linker --*- C++ -*-===//
00002 // 
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 // 
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // Lightweight interface to dynamic library linking and loading, and dynamic
00011 // symbol lookup functionality, in whatever form the operating system
00012 // provides it.
00013 //
00014 //===----------------------------------------------------------------------===//
00015 
00016 #ifndef LLVM_SUPPORT_DYNAMICLINKER_H
00017 #define LLVM_SUPPORT_DYNAMICLINKER_H
00018 
00019 #include <string>
00020 
00021 namespace llvm {
00022 
00023 /// LinkDynamicObject - Load the named file as a dynamic library
00024 /// and link it with the currently running process. Returns false
00025 /// on success, true if there is an error (and sets ErrorMessage
00026 /// if it is not NULL). Analogous to dlopen().
00027 ///
00028 bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
00029 
00030 /// GetAddressOfSymbol - Returns the address of the named symbol in
00031 /// the currently running process, as reported by the dynamic linker,
00032 /// or NULL if the symbol does not exist or some other error has
00033 /// occurred.
00034 /// 
00035 void *GetAddressOfSymbol (const char *symbolName);
00036 void *GetAddressOfSymbol (const std::string &symbolName);
00037 
00038 } // End llvm namespace
00039 
00040 #endif // SUPPORT_DYNAMICLINKER_H