From 22c8319345a279e22cf17aa5f9aa851a2b4091c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 1 Apr 2009 00:26:36 +0000 Subject: * elf/dl-open.c: Keep track of used name spaces and only iterate over those which are used. * elf/dl-addr.c: Likewise. * elf/dl-caller.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. --- elf/dl-iteratephdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'elf/dl-iteratephdr.c') diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c index c496715..fee19f3 100644 --- a/elf/dl-iteratephdr.c +++ b/elf/dl-iteratephdr.c @@ -1,5 +1,5 @@ /* Get loaded objects program headers. - Copyright (C) 2001-2004,2006,2007,2008 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2001. @@ -47,7 +47,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, const void *caller = RETURN_ADDRESS (0); size_t nloaded = GL(dl_ns)[0]._ns_nloaded; Lmid_t ns = 0; - for (Lmid_t cnt = DL_NNS - 1; cnt > 0; --cnt) + for (Lmid_t cnt = GL(dl_nns) - 1; cnt > 0; --cnt) for (struct link_map *l = GL(dl_ns)[cnt]._ns_loaded; l; l = l->l_next) { /* We have to count the total number of loaded objects. */ -- cgit v1.1