summaryrefslogtreecommitdiff
path: root/elf/dl-deps.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-01-21 14:17:43 +0000
committerUlrich Drepper <drepper@redhat.com>1999-01-21 14:17:43 +0000
commit50b65db1ee9a87be6ead950e7cffa4c223e689fd (patch)
tree28ecfe4141d27f096b12cd3174bbbd5c0b9c3d79 /elf/dl-deps.c
parent1d28e93cabf235de32a594d7b770551a34be0e75 (diff)
Update.
1999-01-21 Ulrich Drepper <drepper@cygnus.com> * 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.
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r--elf/dl-deps.c9
1 files changed, 3 insertions, 6 deletions
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;
}