提交 4f8f0380 编写于 作者: R Rich Felker

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

上级 a4fbc82c
#define _GNU_SOURCE
#include <dlfcn.h>
#include "libc.h"
int __dladdr(const void *, Dl_info *);
int dladdr(const void *addr, Dl_info *info)
static int stub_dladdr(const void *addr, Dl_info *info)
{
return __dladdr(addr, info);
return 0;
}
weak_alias(stub_dladdr, dladdr);
......@@ -1823,7 +1823,7 @@ failed:
return 0;
}
int __dladdr(const void *addr, Dl_info *info)
int dladdr(const void *addr, Dl_info *info)
{
struct dso *p;
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);
return 0;
}
int __dladdr (const void *addr, Dl_info *info)
{
return 0;
}
#endif
int __dlinfo(void *dso, int req, void *res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册