|
|
abe59f |
commit eb77a1fccc7e60cea32245c11288c7f1d92545fa
|
|
|
abe59f |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
abe59f |
Date: Wed Oct 16 18:19:51 2019 +0200
|
|
|
abe59f |
|
|
|
abe59f |
dlfcn: Remove remnants of caller sensitivity from dlinfo
|
|
|
abe59f |
|
|
|
abe59f |
dlinfo operates on a specific handle, which means that there is no
|
|
|
abe59f |
caller sensivity involved.
|
|
|
abe59f |
|
|
|
abe59f |
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c
|
|
|
abe59f |
index 964572cc670ceba4..23ef3f57ca41afdf 100644
|
|
|
abe59f |
--- a/dlfcn/dlinfo.c
|
|
|
abe59f |
+++ b/dlfcn/dlinfo.c
|
|
|
abe59f |
@@ -26,7 +26,7 @@
|
|
|
abe59f |
int
|
|
|
abe59f |
dlinfo (void *handle, int request, void *arg)
|
|
|
abe59f |
{
|
|
|
abe59f |
- return __dlinfo (handle, request, arg, RETURN_ADDRESS (0));
|
|
|
abe59f |
+ return __dlinfo (handle, request, arg);
|
|
|
abe59f |
}
|
|
|
abe59f |
|
|
|
abe59f |
#else
|
|
|
abe59f |
@@ -35,7 +35,6 @@ dlinfo (void *handle, int request, void *arg)
|
|
|
abe59f |
|
|
|
abe59f |
struct dlinfo_args
|
|
|
abe59f |
{
|
|
|
abe59f |
- ElfW(Addr) caller;
|
|
|
abe59f |
void *handle;
|
|
|
abe59f |
int request;
|
|
|
abe59f |
void *arg;
|
|
|
abe59f |
@@ -47,24 +46,6 @@ dlinfo_doit (void *argsblock)
|
|
|
abe59f |
struct dlinfo_args *const args = argsblock;
|
|
|
abe59f |
struct link_map *l = args->handle;
|
|
|
abe59f |
|
|
|
abe59f |
-# if 0
|
|
|
abe59f |
- if (args->handle == RTLD_SELF)
|
|
|
abe59f |
- {
|
|
|
abe59f |
- Lmid_t nsid;
|
|
|
abe59f |
-
|
|
|
abe59f |
- /* Find the highest-addressed object that CALLER is not below. */
|
|
|
abe59f |
- for (nsid = 0; nsid < DL_NNS; ++nsid)
|
|
|
abe59f |
- for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
|
|
|
abe59f |
- if (caller >= l->l_map_start && caller < l->l_map_end
|
|
|
abe59f |
- && (l->l_contiguous || _dl_addr_inside_object (l, caller)))
|
|
|
abe59f |
- break;
|
|
|
abe59f |
-
|
|
|
abe59f |
- if (l == NULL)
|
|
|
abe59f |
- _dl_signal_error (0, NULL, NULL, N_("\
|
|
|
abe59f |
-RTLD_SELF used in code not dynamically loaded"));
|
|
|
abe59f |
- }
|
|
|
abe59f |
-# endif
|
|
|
abe59f |
-
|
|
|
abe59f |
switch (args->request)
|
|
|
abe59f |
{
|
|
|
abe59f |
case RTLD_DI_CONFIGADDR:
|
|
|
abe59f |
@@ -108,16 +89,14 @@ RTLD_SELF used in code not dynamically loaded"));
|
|
|
abe59f |
}
|
|
|
abe59f |
|
|
|
abe59f |
int
|
|
|
abe59f |
-__dlinfo (void *handle, int request, void *arg DL_CALLER_DECL)
|
|
|
abe59f |
+__dlinfo (void *handle, int request, void *arg)
|
|
|
abe59f |
{
|
|
|
abe59f |
# ifdef SHARED
|
|
|
abe59f |
if (!rtld_active ())
|
|
|
abe59f |
- return _dlfcn_hook->dlinfo (handle, request, arg,
|
|
|
abe59f |
- DL_CALLER);
|
|
|
abe59f |
+ return _dlfcn_hook->dlinfo (handle, request, arg);
|
|
|
abe59f |
# endif
|
|
|
abe59f |
|
|
|
abe59f |
- struct dlinfo_args args = { (ElfW(Addr)) DL_CALLER,
|
|
|
abe59f |
- handle, request, arg };
|
|
|
abe59f |
+ struct dlinfo_args args = { handle, request, arg };
|
|
|
abe59f |
return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0;
|
|
|
abe59f |
}
|
|
|
abe59f |
# ifdef SHARED
|
|
|
abe59f |
diff --git a/include/dlfcn.h b/include/dlfcn.h
|
|
|
abe59f |
index 0dc57dbe2217cfe7..93dd369ab12a5745 100644
|
|
|
abe59f |
--- a/include/dlfcn.h
|
|
|
abe59f |
+++ b/include/dlfcn.h
|
|
|
abe59f |
@@ -117,7 +117,7 @@ struct dlfcn_hook
|
|
|
abe59f |
int (*dladdr) (const void *address, Dl_info *info);
|
|
|
abe59f |
int (*dladdr1) (const void *address, Dl_info *info,
|
|
|
abe59f |
void **extra_info, int flags);
|
|
|
abe59f |
- int (*dlinfo) (void *handle, int request, void *arg, void *dl_caller);
|
|
|
abe59f |
+ int (*dlinfo) (void *handle, int request, void *arg);
|
|
|
abe59f |
void *(*dlmopen) (Lmid_t nsid, const char *file, int mode, void *dl_caller);
|
|
|
abe59f |
void *pad[4];
|
|
|
abe59f |
};
|
|
|
abe59f |
@@ -143,8 +143,7 @@ extern int __dladdr (const void *address, Dl_info *info)
|
|
|
abe59f |
extern int __dladdr1 (const void *address, Dl_info *info,
|
|
|
abe59f |
void **extra_info, int flags)
|
|
|
abe59f |
attribute_hidden;
|
|
|
abe59f |
-extern int __dlinfo (void *handle, int request, void *arg DL_CALLER_DECL)
|
|
|
abe59f |
- attribute_hidden;
|
|
|
abe59f |
+extern int __dlinfo (void *handle, int request, void *arg) attribute_hidden;
|
|
|
abe59f |
|
|
|
abe59f |
#ifndef SHARED
|
|
|
abe59f |
struct link_map;
|