summaryrefslogtreecommitdiff
path: root/libgcompat/dlvsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgcompat/dlvsym.c')
-rw-r--r--libgcompat/dlvsym.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgcompat/dlvsym.c b/libgcompat/dlvsym.c
new file mode 100644
index 0000000..3d744ea
--- /dev/null
+++ b/libgcompat/dlvsym.c
@@ -0,0 +1,14 @@
+#include <dlfcn.h> // dlsym
+#include <stdio.h> // fprintf
+#include <stdlib.h> // getenv
+
+void *dlvsym(void *handle, char *symbol, char *version)
+{
+ if(getenv("GLIBC_FAKE_DEBUG"))
+ {
+ fprintf(stderr, "symbol %s with version %s is being redirected",
+ symbol, version);
+ }
+
+ return dlsym(handle, symbol);
+}