summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-02-03 03:16:07 -0500
committerRich Felker <dalias@aerifal.cx>2012-02-03 03:16:07 -0500
commit5a09a53010046fce204cb5138329f8aace79ab1a (patch)
treea7dee5ca18203eab4ff96d8bfdeff3dce4ca70c0
parent4f4d6ae985cd6562beafdecd1f90e00a34520b45 (diff)
downloadmusl-5a09a53010046fce204cb5138329f8aace79ab1a.tar.gz
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...
-rw-r--r--src/ldso/dynlink.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 28b86bf7..057a4cd3 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -674,6 +674,16 @@ void *__dlsym(void *p, const char *s, void *ra)
pthread_rwlock_unlock(&lock);
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()
{
@@ -684,4 +694,3 @@ int dlclose(void *p)
{
return 0;
}
-#endif