implement minimal dlinfo function
This commit is contained in:
parent
2b0af609ef
commit
780cbbe63a
3 changed files with 23 additions and 0 deletions
8
src/ldso/dlinfo.c
Normal file
8
src/ldso/dlinfo.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <dlfcn.h>
|
||||
|
||||
int __dlinfo(void *, int, void *);
|
||||
|
||||
int dlinfo(void *dso, int req, void *res)
|
||||
{
|
||||
return __dlinfo(dso, req, res);
|
||||
}
|
||||
|
|
@ -1273,6 +1273,18 @@ int __dladdr (void *addr, Dl_info *info)
|
|||
}
|
||||
#endif
|
||||
|
||||
int __dlinfo(void *dso, int req, void *res)
|
||||
{
|
||||
if (invalid_dso_handle(dso)) return -1;
|
||||
if (req != RTLD_DI_LINKMAP) {
|
||||
snprintf(errbuf, sizeof errbuf, "Unsupported request %d", req);
|
||||
errflag = 1;
|
||||
return -1;
|
||||
}
|
||||
*(struct link_map **)res = dso;
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *dlerror()
|
||||
{
|
||||
if (!errflag) return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue