summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-08 01:50:04 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-08 01:50:04 +0000
commit1c14af448eef3274c386069b78b2ce93f2a5e3c6 (patch)
treeb1ccb62a3185d2a0d4a285f0bfa55b38a92a23dd /elf
parent7b228b6857ffc46e13b57ba2d1f6955320e46871 (diff)
downloadglibc-1c14af448eef3274c386069b78b2ce93f2a5e3c6.tar.gz
glibc-1c14af448eef3274c386069b78b2ce93f2a5e3c6.tar.xz
glibc-1c14af448eef3274c386069b78b2ce93f2a5e3c6.zip
Update.
	* elf/dl-addr.c (_dl_addr): Do exact testing of address range
	using l_map_start and l_map_end.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-addr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index b0b864fa57..3932a6573a 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -34,12 +34,13 @@ _dl_addr (const void *address, Dl_info *info)
   /* Find the highest-addressed object that ADDRESS is not below.  */
   match = NULL;
   for (l = _dl_loaded; l; l = l->l_next)
-    if (l->l_addr != 0	/* Make sure we do not currently set this map up
-			   in this moment.  */
-	&& addr >= l->l_addr && (!match || match->l_addr < l->l_addr))
-      match = l;
+    if (addr >= l->l_map_start && addr < l->l_map_end)
+      {
+	match = l;
+	break;
+      }
 
-  if (match)
+  if (__builtin_expect (match != NULL, 1))
     {
       /* We know ADDRESS lies within MATCH if in any shared object.
 	 Make sure it isn't past the end of MATCH's segments.  */