From 5b3c4afff20d1700eb7798556bf385bfdf17f8c9 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 23 May 2019 15:32:30 +0200 Subject: [PATCH] LibC: Stub out dlfcn --- LibC/Makefile | 3 ++- LibC/dlfcn.cpp | 22 ++++++++++++++++++++++ LibC/dlfcn.h | 11 +++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 LibC/dlfcn.cpp create mode 100644 LibC/dlfcn.h 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 + +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*);