mirror of git://sourceware.org/git/glibc.git
dlfcn: Remove remnants of caller sensitivity from dlinfo
dlinfo operates on a specific handle, which means that there is no caller sensivity involved.
This commit is contained in:
parent
58e8f5fd2b
commit
eb77a1fccc
|
|
@ -26,7 +26,7 @@
|
||||||
int
|
int
|
||||||
dlinfo (void *handle, int request, void *arg)
|
dlinfo (void *handle, int request, void *arg)
|
||||||
{
|
{
|
||||||
return __dlinfo (handle, request, arg, RETURN_ADDRESS (0));
|
return __dlinfo (handle, request, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
@ -35,7 +35,6 @@ dlinfo (void *handle, int request, void *arg)
|
||||||
|
|
||||||
struct dlinfo_args
|
struct dlinfo_args
|
||||||
{
|
{
|
||||||
ElfW(Addr) caller;
|
|
||||||
void *handle;
|
void *handle;
|
||||||
int request;
|
int request;
|
||||||
void *arg;
|
void *arg;
|
||||||
|
|
@ -47,24 +46,6 @@ dlinfo_doit (void *argsblock)
|
||||||
struct dlinfo_args *const args = argsblock;
|
struct dlinfo_args *const args = argsblock;
|
||||||
struct link_map *l = args->handle;
|
struct link_map *l = args->handle;
|
||||||
|
|
||||||
# if 0
|
|
||||||
if (args->handle == RTLD_SELF)
|
|
||||||
{
|
|
||||||
Lmid_t nsid;
|
|
||||||
|
|
||||||
/* Find the highest-addressed object that CALLER is not below. */
|
|
||||||
for (nsid = 0; nsid < DL_NNS; ++nsid)
|
|
||||||
for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
|
|
||||||
if (caller >= l->l_map_start && caller < l->l_map_end
|
|
||||||
&& (l->l_contiguous || _dl_addr_inside_object (l, caller)))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (l == NULL)
|
|
||||||
_dl_signal_error (0, NULL, NULL, N_("\
|
|
||||||
RTLD_SELF used in code not dynamically loaded"));
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
switch (args->request)
|
switch (args->request)
|
||||||
{
|
{
|
||||||
case RTLD_DI_CONFIGADDR:
|
case RTLD_DI_CONFIGADDR:
|
||||||
|
|
@ -108,16 +89,14 @@ RTLD_SELF used in code not dynamically loaded"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__dlinfo (void *handle, int request, void *arg DL_CALLER_DECL)
|
__dlinfo (void *handle, int request, void *arg)
|
||||||
{
|
{
|
||||||
# ifdef SHARED
|
# ifdef SHARED
|
||||||
if (!rtld_active ())
|
if (!rtld_active ())
|
||||||
return _dlfcn_hook->dlinfo (handle, request, arg,
|
return _dlfcn_hook->dlinfo (handle, request, arg);
|
||||||
DL_CALLER);
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
struct dlinfo_args args = { (ElfW(Addr)) DL_CALLER,
|
struct dlinfo_args args = { handle, request, arg };
|
||||||
handle, request, arg };
|
|
||||||
return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0;
|
return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0;
|
||||||
}
|
}
|
||||||
# ifdef SHARED
|
# ifdef SHARED
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ struct dlfcn_hook
|
||||||
int (*dladdr) (const void *address, Dl_info *info);
|
int (*dladdr) (const void *address, Dl_info *info);
|
||||||
int (*dladdr1) (const void *address, Dl_info *info,
|
int (*dladdr1) (const void *address, Dl_info *info,
|
||||||
void **extra_info, int flags);
|
void **extra_info, int flags);
|
||||||
int (*dlinfo) (void *handle, int request, void *arg, void *dl_caller);
|
int (*dlinfo) (void *handle, int request, void *arg);
|
||||||
void *(*dlmopen) (Lmid_t nsid, const char *file, int mode, void *dl_caller);
|
void *(*dlmopen) (Lmid_t nsid, const char *file, int mode, void *dl_caller);
|
||||||
void *pad[4];
|
void *pad[4];
|
||||||
};
|
};
|
||||||
|
|
@ -143,8 +143,7 @@ extern int __dladdr (const void *address, Dl_info *info)
|
||||||
extern int __dladdr1 (const void *address, Dl_info *info,
|
extern int __dladdr1 (const void *address, Dl_info *info,
|
||||||
void **extra_info, int flags)
|
void **extra_info, int flags)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
extern int __dlinfo (void *handle, int request, void *arg DL_CALLER_DECL)
|
extern int __dlinfo (void *handle, int request, void *arg) attribute_hidden;
|
||||||
attribute_hidden;
|
|
||||||
|
|
||||||
#ifndef SHARED
|
#ifndef SHARED
|
||||||
struct link_map;
|
struct link_map;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue