Base Framework
|
Dynamic linker loader. More...
#include <base/dl/DynamicLinker.h>
Classes | |
struct | StaticFunctionDescriptor |
class | SymbolInfo |
Public Types | |
enum | Options { LAZY = 1, GLOBAL = 2 } |
enum | Flags { CONTINUE = 1 } |
typedef void(* | Function) () |
Public Member Functions | |
DynamicLinker (const String &module, unsigned int options=LAZY) | |
void * | getSymbol (const String &symbol) const |
void * | getSymbol (const Literal &symbol) const |
void * | getUncertainSymbol (const String &symbol) const noexcept |
void * | getUncertainSymbol (const Literal &symbol) const noexcept |
bool | import (StaticFunctionDescriptor *functions, unsigned int numberOfFunctions, bool flags=0) noexcept |
~DynamicLinker () noexcept(false) | |
Static Public Member Functions | |
template<class TYPE > | |
static TYPE | getGlobalSymbol (const String &symbol) |
static void * | getGlobalSymbol (const char *symbol) noexcept |
static void * | getModule (const char *path) noexcept |
static void * | getProcessImage () noexcept |
static void * | getBaseFrameworkImage () noexcept |
static void * | getImageAddress (const void *address) noexcept |
static String | getImagePath (const void *address) |
static void * | getSymbolAddress (const void *address) noexcept |
static String | getSymbolName (const void *address) |
static SymbolInfo | getSymbolInfo (const void *address) noexcept |
Dynamic linker loader.
This class provides on-demand loading of (shared) objects.
enum DynamicLinker::Flags |
Opens a Dynamic Shared Object (DSO) with the specified options. LACY relocations may not be supported the particular platform in which case all relocations will be resolved during object initialization.
module | The path of the module to open. |
options | The linking options. Default is LAZY. |
|
noexcept |
Closes the module.
|
staticnoexcept |
Returns the image address of the Base Framework model (can be the executable module for static linking).
|
staticnoexcept |
Returns address of symbol.
|
inlinestatic |
Returns address of symbol.
|
staticnoexcept |
Returns the image address for the given process address.
|
static |
Returns the path of the image for the given process address.
|
staticnoexcept |
Returns the module handle if already loaded.
|
staticnoexcept |
Returns the image address of the executable.
void* DynamicLinker::getSymbol | ( | const Literal & | symbol | ) | const |
Returns the address of the specified symbol.
symbol | The symbol to be resolved. |
void* DynamicLinker::getSymbol | ( | const String & | symbol | ) | const |
Returns the address of the specified symbol.
symbol | The symbol to be resolved. |
|
staticnoexcept |
Returns the closest symbol for the given process address.
|
staticnoexcept |
Returns the closest symbol for the given process address.
|
static |
Returns the closest symbol for the given process address.
|
noexcept |
Returns the address of the specified symbol.
symbol | The symbol to be resolved. |
|
noexcept |
Returns the address of the specified symbol.
symbol | The symbol to be resolved. |
|
noexcept |
Imports the addresses of the specified symbols/functions.
functions | The desired functions. |
numberOfFunctions | The number of functions. |
flags | The flags. |