summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-05-23 15:32:30 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-23 16:57:34 +0200
commit5b3c4afff20d1700eb7798556bf385bfdf17f8c9 (patch)
treec31cff37960bbadb1c4aa213f4177db8a97b8229
parent14a202f011d70c9b7ba04af93c760c616c12675d (diff)
downloadserenity-5b3c4afff20d1700eb7798556bf385bfdf17f8c9.zip
LibC: Stub out dlfcn
-rw-r--r--LibC/Makefile3
-rw-r--r--LibC/dlfcn.cpp22
-rw-r--r--LibC/dlfcn.h11
3 files changed, 35 insertions, 1 deletions
diff --git a/LibC/Makefile b/LibC/Makefile
index b259c98c1f..97048382d5 100644
--- a/LibC/Makefile
+++ b/LibC/Makefile
@@ -46,7 +46,8 @@ LIBC_OBJS = \
locale.o \
arpa/inet.o \
netdb.o \
- sched.o
+ sched.o \
+ dlfcn.o
ASM_OBJS = setjmp.ao crti.ao crtn.ao
diff --git a/LibC/dlfcn.cpp b/LibC/dlfcn.cpp
new file mode 100644
index 0000000000..e654626d83
--- /dev/null
+++ b/LibC/dlfcn.cpp
@@ -0,0 +1,22 @@
+#include "dlfcn.h"
+#include <assert.h>
+
+int dlclose(void*)
+{
+ ASSERT_NOT_REACHED();
+}
+
+char *dlerror()
+{
+ ASSERT_NOT_REACHED();
+}
+
+void *dlopen(const char*, int)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void *dlsym(void*, const char*)
+{
+ ASSERT_NOT_REACHED();
+}
diff --git a/LibC/dlfcn.h b/LibC/dlfcn.h
new file mode 100644
index 0000000000..599121d203
--- /dev/null
+++ b/LibC/dlfcn.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#define RTLD_LAZY 1
+#define RTLD_NOW 2
+#define RTLD_GLOBAL 3
+#define RTLD_LOCAL 4
+
+int dlclose(void*);
+char *dlerror();
+void *dlopen(const char*, int);
+void *dlsym(void*, const char*);