From 50b65db1ee9a87be6ead950e7cffa4c223e689fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Jan 1999 14:17:43 +0000 Subject: Update. 1999-01-21 Ulrich Drepper * elf/dl-close.c: Rewrite the way adding to the global scope works to handle error cases better than the last change. The l_global flag is now only set when the object is actually counted in the global scope list. * elf/dl-deps.c: Likewise. * elf/dl-open.c: Likewise. --- elf/dl-deps.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'elf/dl-deps.c') diff --git a/elf/dl-deps.c b/elf/dl-deps.c index 04c4010b65..355618ad1c 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -1,5 +1,5 @@ /* Load the dependencies of a mapped object. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -93,6 +93,7 @@ _dl_map_object_deps (struct link_map *map, struct list known[1 + npreloads + 1]; struct list *runp, *utail, *dtail; unsigned int nlist, nduplist, i; + unsigned int to_add = 0; inline void preload (struct link_map *map) { @@ -416,7 +417,6 @@ _dl_map_object_deps (struct link_map *map, if (global_scope) { unsigned int cnt; - unsigned int to_add = 0; struct link_map **new_global; /* Count the objects we have to put in the global scope. */ @@ -479,16 +479,13 @@ _dl_map_object_deps (struct link_map *map, for (cnt = 0; cnt < nlist; ++cnt) if (map->l_searchlist.r_list[cnt]->l_global == 0) { - map->l_searchlist.r_list[cnt]->l_global = 1; _dl_main_searchlist->r_list[_dl_main_searchlist->r_nlist + to_add] = map->l_searchlist.r_list[cnt]; ++to_add; } /* XXX Do we have to add something to r_dupsearchlist??? --drepper */ - - return to_add; } - return 0; + return to_add; } -- cgit v1.2.1