aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-addr.c')
-rw-r--r--elf/dl-addr.c3
1 files changed, 2 insertions, 1 deletions
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