summaryrefslogtreecommitdiff
path: root/dlmopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'dlmopen.c')
-rw-r--r--dlmopen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/dlmopen.c b/dlmopen.c
new file mode 100644
index 0000000..fecb29c
--- /dev/null
+++ b/dlmopen.c
@@ -0,0 +1,15 @@
+#include <dlfcn.h> // dlopen
+#include <stdio.h> // fprintf
+#include <stdlib.h> // getenv
+
+void *dlmopen(long lmid, const char *pathname, int mode)
+{
+ if(getenv("GLIBC_FAKE_DEBUG"))
+ {
+ fprintf(stderr, "library %s was requested to load in %ld namespace",
+ pathname, lmid);
+ }
+
+ return dlopen(pathname, mode);
+}
+