13#if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
24 DynamicLibrary::SearchOrder = DynamicLibrary::SO_Linker;
28 void *Handle = ::dlopen(File, RTLD_LAZY | RTLD_GLOBAL);
32 return &DynamicLibrary::Invalid;
39 Handle = RTLD_DEFAULT;
48 return ::dlsym(Handle, Symbol);
57 *Err =
"dlopen() not supported on this platform";
70static void *DoSearch(
const char *SymbolName) {
71#define EXPLICIT_SYMBOL(SYM) \
73 if (!strcmp(SymbolName, #SYM)) \
89 EXPLICIT_SYMBOL(__eprintf);
97 EXPLICIT_SYMBOL(_alloca);
98 EXPLICIT_SYMBOL(__main);
102#undef EXPLICIT_SYMBOL
105#define EXPLICIT_SYMBOL(SYM) \
106 if (!strcmp(SymbolName, #SYM)) \
112#if defined(__GLIBC__)
114 EXPLICIT_SYMBOL(stderr);
115 EXPLICIT_SYMBOL(stdout);
116 EXPLICIT_SYMBOL(stdin);
123 EXPLICIT_SYMBOL(stdin);
126 EXPLICIT_SYMBOL(stdout);
129 EXPLICIT_SYMBOL(stderr);
133#undef EXPLICIT_SYMBOL
static void * DLOpen(const char *Filename, std::string *Err)
static void * DLSym(void *Handle, const char *Symbol)
static void DLClose(void *Handle)
auto reverse(ContainerTy &&C)