From 8114530a31e03aec4085f79971c2a3b9e940eae3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jul 2000 22:09:30 +0000 Subject: Update. 2000-07-17 Bruno Haible * iconv/gconv_open.c (__gconv_open): Initialize the __data field of struct __gconv_trans_data differently. Don't pass NULL to trans_init_fct. Simplify list append operation. 2000-07-14 Bruno Haible * intl/dcigettext.c (dcigettext): Call plural_eval on all platforms, not only those having tsearch. 2000-07-17 Ulrich Drepper * locale/langinfo.h: Add placeholder values in enum for removed LC_CTYPE entries. 2000-07-17 Jakub Jelinek * elf/dl-addr.c (_dl_addr): Keep searching in the _dl_loaded chain if the PHDR check fails. 2000-07-17 Mark Kettenis * nss/getent.c (print_hosts): Make sure we always print a space between numeric addresses and hostnames. 2000-07-17 Wolfram Gloger * malloc/malloc.c (chunk_alloc): Use mmap_chunk() only if allowed, i.e. if n_mmaps_max>0. 2000-07-16 Mark Kettenis * resolv/netdb.h (AI_V4MAPPED, AI_ALL, AI_ADDRCONFIG): Adjust values to remove possible clash with other AI_* constants. (AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST): Define as hexadecimal constants to stress the fact they're in fact bit flags. 2000-07-15 Mark Kettenis * nss/getXXent_r.c [NEED__RES]: Include . (SETFUNC_NAME, ENDFUNC_NAME, REENTRANT_GETNAME): Use res_ninit instead of res_init. --- elf/dl-addr.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'elf/dl-addr.c') diff --git a/elf/dl-addr.c b/elf/dl-addr.c index d3adf12c67..2fda238cfb 100644 --- a/elf/dl-addr.c +++ b/elf/dl-addr.c @@ -36,27 +36,25 @@ _dl_addr (const void *address, Dl_info *info) for (l = _dl_loaded; l; l = l->l_next) if (addr >= l->l_map_start && addr < l->l_map_end) { + /* We know ADDRESS lies within L if in any shared object. + Make sure it isn't past the end of L's segments. */ + size_t n = l->l_phnum; + if (n > 0) + { + do + --n; + while (l->l_phdr[n].p_type != PT_LOAD); + if (addr >= (l->l_addr + + l->l_phdr[n].p_vaddr + l->l_phdr[n].p_memsz)) + /* Off the end of the highest-addressed shared object. */ + continue; + } + match = l; break; } - 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. */ - size_t n = match->l_phnum; - if (n > 0) - { - do - --n; - while (match->l_phdr[n].p_type != PT_LOAD); - if (addr >= (match->l_addr + - match->l_phdr[n].p_vaddr + match->l_phdr[n].p_memsz)) - /* Off the end of the highest-addressed shared object. */ - return 0; - } - } - else + if (match == NULL) return 0; /* Now we know what object the address lies in. */ -- cgit v1.2.3