From 32c075e1f01849e161724bbd400ba77244e482cc Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 31 Jul 2007 13:33:18 +0000 Subject: . --- elf/dl-iteratephdr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'elf/dl-iteratephdr.c') diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c index d03d8b6daf..b29534d5c9 100644 --- a/elf/dl-iteratephdr.c +++ b/elf/dl-iteratephdr.c @@ -1,5 +1,5 @@ /* Get loaded objects program headers. - Copyright (C) 2001,2002,2003,2004,2006 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2003,2004,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2001. @@ -54,9 +54,9 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, nloaded += GL(dl_ns)[cnt]._ns_nloaded; if (caller >= (const void *) l->l_map_start - && caller < (const void *) l->l_map_end) - /* There must be exactly one DSO for the range of the virtual - memory. Otherwise something is really broken. */ + && caller < (const void *) l->l_map_end + && (l->l_contiguous + || _dl_addr_inside_object (l, (ElfW(Addr)) caller))) ns = cnt; } @@ -70,9 +70,11 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, info.dlpi_subs = GL(dl_load_adds) - nloaded; info.dlpi_tls_modid = 0; info.dlpi_tls_data = NULL; +#ifdef USE_TLS info.dlpi_tls_modid = l->l_tls_modid; if (info.dlpi_tls_modid != 0) info.dlpi_tls_data = _dl_tls_get_addr_soft (l); +#endif ret = callback (&info, sizeof (struct dl_phdr_info), data); if (ret) break; -- cgit v1.2.3