mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Attempt to provide support for those without RTLD_DEFAULT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9503 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b8afbe6139
commit
764486f5e4
@ -37,7 +37,12 @@ bool LinkDynamicObject (const char *filename, std::string *ErrorMessage) {
|
|||||||
|
|
||||||
void *GetAddressOfSymbol (const char *symbolName) {
|
void *GetAddressOfSymbol (const char *symbolName) {
|
||||||
#if defined (HAVE_DLOPEN)
|
#if defined (HAVE_DLOPEN)
|
||||||
|
#ifdef RTLD_DEFAULT
|
||||||
return dlsym (RTLD_DEFAULT, symbolName);
|
return dlsym (RTLD_DEFAULT, symbolName);
|
||||||
|
#else
|
||||||
|
static void* CurHandle = dlopen(0, RTLD_LAZY);
|
||||||
|
return dlsym(CurHandle, symbolName);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
assert (0 && "Dynamic symbol lookup not implemented for this platform");
|
assert (0 && "Dynamic symbol lookup not implemented for this platform");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user