mirror of https://git.musl-libc.org/git/musl
2 changed files with 12 additions and 16 deletions
@ -1,9 +1,19 @@ |
|||
#define _GNU_SOURCE |
|||
#include <dlfcn.h> |
|||
|
|||
int __dlinfo(void *, int, void *); |
|||
__attribute__((__visibility__("hidden"))) |
|||
int __dl_invalid_handle(void *); |
|||
|
|||
__attribute__((__visibility__("hidden"))) |
|||
void __dl_seterr(const char *, ...); |
|||
|
|||
int dlinfo(void *dso, int req, void *res) |
|||
{ |
|||
return __dlinfo(dso, req, 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; |
|||
} |
|||
|
|||
Loading…
Reference in new issue