From: Rich Felker Date: Mon, 25 Jan 2016 23:58:06 +0000 (-0500) Subject: move static-linked stub dlopen out of dynlink.c X-Git-Tag: v1.1.13~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=14469371cd1efd2be44f0825fec9ad8bb3216da9;p=oweals%2Fmusl.git move static-linked stub dlopen out of dynlink.c --- diff --git a/src/ldso/dlopen.c b/src/ldso/dlopen.c new file mode 100644 index 00000000..dcdb4398 --- /dev/null +++ b/src/ldso/dlopen.c @@ -0,0 +1,13 @@ +#include +#include "libc.h" + +__attribute__((__visibility__("hidden"))) +void __dl_seterr(const char *, ...); + +static void *stub_dlopen(const char *file, int mode) +{ + __dl_seterr("Dynamic loading not supported"); + return 0; +} + +weak_alias(stub_dlopen, dlopen); diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 2598063e..43f86fa3 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -1914,11 +1914,6 @@ int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void return ret; } #else -void *dlopen(const char *file, int mode) -{ - error("Dynamic loading not supported"); - return 0; -} void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra) { error("Symbol not found: %s", s);