summary refs log tree commit diff
path: root/dlfcn
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-10-16 18:19:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-10-16 18:21:30 +0200
commiteb77a1fccc7e60cea32245c11288c7f1d92545fa (patch)
tree8ec5d5bd88d3ef01e515f4671fdce56a75f3d91e /dlfcn
parent58e8f5fd2ba47b6dc47fd4d0a35e4175c7c87aaa (diff)
downloadglibc-eb77a1fccc7e60cea32245c11288c7f1d92545fa.tar.gz
glibc-eb77a1fccc7e60cea32245c11288c7f1d92545fa.tar.xz
glibc-eb77a1fccc7e60cea32245c11288c7f1d92545fa.zip
dlfcn: Remove remnants of caller sensitivity from dlinfo
dlinfo operates on a specific handle, which means that there is no
caller sensivity involved.
Diffstat (limited to 'dlfcn')
-rw-r--r--dlfcn/dlinfo.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c
index 4b031d8130..97515a16d9 100644
--- a/dlfcn/dlinfo.c
+++ b/dlfcn/dlinfo.c
@@ -26,7 +26,7 @@
 int
 dlinfo (void *handle, int request, void *arg)
 {
-  return __dlinfo (handle, request, arg, RETURN_ADDRESS (0));
+  return __dlinfo (handle, request, arg);
 }
 
 #else
@@ -35,7 +35,6 @@ dlinfo (void *handle, int request, void *arg)
 
 struct dlinfo_args
 {
-  ElfW(Addr) caller;
   void *handle;
   int request;
   void *arg;
@@ -47,24 +46,6 @@ dlinfo_doit (void *argsblock)
   struct dlinfo_args *const args = argsblock;
   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)
     {
     case RTLD_DI_CONFIGADDR:
@@ -108,16 +89,14 @@ RTLD_SELF used in code not dynamically loaded"));
 }
 
 int
-__dlinfo (void *handle, int request, void *arg DL_CALLER_DECL)
+__dlinfo (void *handle, int request, void *arg)
 {
 # ifdef SHARED
   if (!rtld_active ())
-    return _dlfcn_hook->dlinfo (handle, request, arg,
-				DL_CALLER);
+    return _dlfcn_hook->dlinfo (handle, request, arg);
 # endif
 
-  struct dlinfo_args args = { (ElfW(Addr)) DL_CALLER,
-			      handle, request, arg };
+  struct dlinfo_args args = { handle, request, arg };
   return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0;
 }
 # ifdef SHARED