Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 23 Aug 2001 02:46:15 +0000 (02:46 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 23 Aug 2001 02:46:15 +0000 (02:46 +0000)
* elf/dl-addr.c (_dl_addr): Handle broken binaries with zero
symbol sizes a bit better.

ChangeLog
elf/dl-addr.c

index cb91ed7..10f1e12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-08-22  Ulrich Drepper  <drepper@redhat.com>
 
 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>.
 
        * sysdeps/ia64/strncpy.S: Complete rewrite.
        Contributed by Jakub Jelinek <jakub@redhat.com>.
 
index 96fa2e2..ebb6285 100644 (file)
@@ -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
      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
        && symtab->st_name < strtabsize
        && (matchsym == NULL || matchsym->st_value < symtab->st_value)
        && (ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL