提交 5a09a530 编写于 作者: R Rich Felker

include dummied-out dlopen and dlsym functions for static binaries

these don't work (or do anything at all) but at least make it possible
to static link programs that insist on "having" dynamic loading
support...as long as they don't actually need to use it.

adding real support for dlopen/dlsym with static linking is going to
be significantly more difficult...
上级 4f4d6ae9
...@@ -674,6 +674,16 @@ void *__dlsym(void *p, const char *s, void *ra) ...@@ -674,6 +674,16 @@ void *__dlsym(void *p, const char *s, void *ra)
pthread_rwlock_unlock(&lock); pthread_rwlock_unlock(&lock);
return res; return res;
} }
#else
void *dlopen(const char *file, int mode)
{
return 0;
}
void *__dlsym(void *p, const char *s, void *ra)
{
return 0;
}
#endif
char *dlerror() char *dlerror()
{ {
...@@ -684,4 +694,3 @@ int dlclose(void *p) ...@@ -684,4 +694,3 @@ int dlclose(void *p)
{ {
return 0; return 0;
} }
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册