1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
* elf/dl-addr.c (_dl_addr): Handle broken binaries with zero
	symbol sizes a bit better.
This commit is contained in:
Ulrich Drepper
2001-08-23 02:46:15 +00:00
parent c5d8d55586
commit 40b145c443
2 changed files with 5 additions and 1 deletions

View 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
&& 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