projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8a07ed0
)
Increment reference counters here.
author
drepper
<drepper>
Tue, 24 Oct 2000 07:34:11 +0000
(07:34 +0000)
committer
drepper
<drepper>
Tue, 24 Oct 2000 07:34:11 +0000
(07:34 +0000)
elf/dl-open.c
patch
|
blob
|
history
diff --git
a/elf/dl-open.c
b/elf/dl-open.c
index
5c078d9
..
b278e20
100644
(file)
--- a/
elf/dl-open.c
+++ b/
elf/dl-open.c
@@
-238,7
+238,8
@@
dl_open_worker (void *a)
return;
}
return;
}
- if (new->l_searchlist.r_list)
+ /* It was already open. */
+ if (new->l_searchlist.r_list != NULL)
{
/* Let the user know about the opencount. */
if (__builtin_expect (_dl_debug_files, 0))
{
/* Let the user know about the opencount. */
if (__builtin_expect (_dl_debug_files, 0))
@@
-259,13
+260,19
@@
dl_open_worker (void *a)
if ((mode & RTLD_GLOBAL) && new->l_global == 0)
(void) add_to_global (new);
if ((mode & RTLD_GLOBAL) && new->l_global == 0)
(void) add_to_global (new);
- /* It was already open. */
+ /* Increment just the reference counter of the object. */
+ ++new->l_opencount;
+
return;
}
/* Load that object's dependencies. */
_dl_map_object_deps (new, NULL, 0, 0);
return;
}
/* Load that object's dependencies. */
_dl_map_object_deps (new, NULL, 0, 0);
+ /* Increment the open count for all dependencies. */
+ for (i = 0; i < new->l_searchlist.r_nlist; ++i)
+ ++new->l_searchlist.r_list[i]->l_opencount;
+
/* So far, so good. Now check the versions. */
for (i = 0; i < new->l_searchlist.r_nlist; ++i)
if (new->l_searchlist.r_list[i]->l_versions == NULL)
/* So far, so good. Now check the versions. */
for (i = 0; i < new->l_searchlist.r_nlist; ++i)
if (new->l_searchlist.r_list[i]->l_versions == NULL)