diff options
Diffstat (limited to 'libc-top-half/musl/src/ldso/dlinfo.c')
-rw-r--r-- | libc-top-half/musl/src/ldso/dlinfo.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/ldso/dlinfo.c b/libc-top-half/musl/src/ldso/dlinfo.c new file mode 100644 index 0000000..b55f5fe --- /dev/null +++ b/libc-top-half/musl/src/ldso/dlinfo.c @@ -0,0 +1,14 @@ +#define _GNU_SOURCE +#include <dlfcn.h> +#include "dynlink.h" + +int dlinfo(void *dso, int req, void *res) +{ + if (__dl_invalid_handle(dso)) return -1; + if (req != RTLD_DI_LINKMAP) { + __dl_seterr("Unsupported request %d", req); + return -1; + } + *(struct link_map **)res = dso; + return 0; +} |