move static/stub version of dladdr out of dynlink.c

This commit is contained in:
Rich Felker 2016-01-25 18:37:05 -05:00
parent a4fbc82c8e
commit 4f8f038060
2 changed files with 6 additions and 9 deletions

View File

@ -1,9 +1,10 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <dlfcn.h> #include <dlfcn.h>
#include "libc.h"
int __dladdr(const void *, Dl_info *); static int stub_dladdr(const void *addr, Dl_info *info)
int dladdr(const void *addr, Dl_info *info)
{ {
return __dladdr(addr, info); return 0;
} }
weak_alias(stub_dladdr, dladdr);

View File

@ -1823,7 +1823,7 @@ failed:
return 0; return 0;
} }
int __dladdr(const void *addr, Dl_info *info) int dladdr(const void *addr, Dl_info *info)
{ {
struct dso *p; struct dso *p;
Sym *sym, *bestsym; Sym *sym, *bestsym;
@ -1928,10 +1928,6 @@ void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
error("Symbol not found: %s", s); error("Symbol not found: %s", s);
return 0; return 0;
} }
int __dladdr (const void *addr, Dl_info *info)
{
return 0;
}
#endif #endif
int __dlinfo(void *dso, int req, void *res) int __dlinfo(void *dso, int req, void *res)