#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);
return 0;
}
-int __dladdr(const void *addr, Dl_info *info)
+int dladdr(const void *addr, Dl_info *info)
{
struct dso *p;
Sym *sym, *bestsym;
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)