mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Add in some methods for use by the JIT. LoadLibraryPermanently brings the
library into the address space permanently. SearchForAddressOfSymbol looks in all previously permanently loaded libraries and any currently open libraries for a symbol, instead of just one library like GetAddressOfSymbol git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a564845f83
commit
b0b0ea07bb
@ -56,6 +56,31 @@ namespace sys {
|
||||
/// @brief Closes the DynamicLibrary
|
||||
~DynamicLibrary();
|
||||
|
||||
/// @}
|
||||
/// @name Functions
|
||||
/// @{
|
||||
public:
|
||||
/// This function allows a library to be loaded without instantiating a
|
||||
/// DynamicLibrary object. Consequently, it is marked as being permanent
|
||||
/// and will only be unloaded when the program terminates.
|
||||
/// @throws std::string on error.
|
||||
/// @brief Open a dynamic library permanently.
|
||||
static void LoadLibraryPermanently(const char* filename);
|
||||
|
||||
/// This function will search through all previously loaded dynamic
|
||||
/// libraries for the symbol \p symbolName. If it is found, the addressof
|
||||
/// that symbol is returned. If not, null is returned. Note that this will
|
||||
/// search permanently loaded libraries (LoadLibraryPermanently) as well
|
||||
/// as ephemerally loaded libraries (constructors).
|
||||
/// @throws std::string on error.
|
||||
/// @brief Search through libraries for address of a symbol
|
||||
static void* SearchForAddressOfSymbol(const char* symbolName);
|
||||
|
||||
/// @brief Convenience function for C++ophiles.
|
||||
static void* SearchForAddressOfSymbol(const std::string& symbolName) {
|
||||
return SearchForAddressOfSymbol(symbolName.c_str());
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Accessors
|
||||
/// @{
|
||||
|
Loading…
Reference in New Issue
Block a user