about summary refs log tree commit diff
path: root/src/ldso/__dlsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso/__dlsym.c')
-rw-r--r--src/ldso/__dlsym.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ldso/__dlsym.c b/src/ldso/__dlsym.c
new file mode 100644
index 00000000..99aafdf9
--- /dev/null
+++ b/src/ldso/__dlsym.c
@@ -0,0 +1,13 @@
+#include <dlfcn.h>
+#include "libc.h"
+
+__attribute__((__visibility__("hidden")))
+void __dl_seterr(const char *, ...);
+
+static void *stub_dlsym(void *restrict p, const char *restrict s, void *restrict ra)
+{
+	__dl_seterr("Symbol not found: %s", s);
+	return 0;
+}
+
+weak_alias(stub_dlsym, __dlsym);