about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-23 02:46:15 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-23 02:46:15 +0000
commit40b145c443205234d7996c8f2bb6200905b13a4b (patch)
treec04487d7f600157887aa08e01756bf54f06a0a12
parentc5d8d55586dac27c2e4c103f2db6855b2ab4eb2c (diff)
downloadglibc-40b145c443205234d7996c8f2bb6200905b13a4b.tar.gz
glibc-40b145c443205234d7996c8f2bb6200905b13a4b.tar.xz
glibc-40b145c443205234d7996c8f2bb6200905b13a4b.zip
Update.
	* elf/dl-addr.c (_dl_addr): Handle broken binaries with zero
	symbol sizes a bit better.
-rw-r--r--ChangeLog3
-rw-r--r--elf/dl-addr.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cb91ed7379..10f1e12c69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-08-22  Ulrich Drepper  <drepper@redhat.com>
 
+	* elf/dl-addr.c (_dl_addr): Handle broken binaries with zero
+	symbol sizes a bit better.
+
 	* sysdeps/ia64/strncpy.S: Complete rewrite.
 	Contributed by Jakub Jelinek <jakub@redhat.com>.
 
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 96fa2e2ebc..ebb62858e6 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -77,7 +77,8 @@ _dl_addr (const void *address, Dl_info *info)
      there is no way in ELF to know the size of the dynamic symbol table!!  */
   for (matchsym = NULL; (void *) symtab < (void *) strtab; ++symtab)
     if (addr >= match->l_addr + symtab->st_value
-	&& addr < match->l_addr + symtab->st_value + symtab->st_size
+	&& ((symtab->st_size == 0 && addr == match->l_addr + symtab->st_value)
+	    || addr < match->l_addr + symtab->st_value + symtab->st_size)
 	&& symtab->st_name < strtabsize
 	&& (matchsym == NULL || matchsym->st_value < symtab->st_value)
 	&& (ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL