diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-09-20 00:11:37 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-09-20 00:11:37 +0000 |
commit | 62beba6902f315a14113c26ed3e068342e101399 (patch) | |
tree | e45d44d1e6f5856a91a1fc98d5f635c82322a183 /elf/dl-lookup.c | |
parent | 7913ba4d91b848ec4e5698c59d43198a3ef9215d (diff) | |
download | glibc-62beba6902f315a14113c26ed3e068342e101399.tar glibc-62beba6902f315a14113c26ed3e068342e101399.tar.gz glibc-62beba6902f315a14113c26ed3e068342e101399.tar.bz2 glibc-62beba6902f315a14113c26ed3e068342e101399.zip |
Updated to fedora-glibc-20070920T0007cvs/fedora-glibc-2_6_90-15
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r-- | elf/dl-lookup.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index ce28f8631c..c529007ca1 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -162,8 +162,8 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags) goto out_check; /* Avoid references to objects which cannot be unloaded anyway. */ - if (map->l_type != lt_loaded - || (map->l_flags_1 & DF_1_NODELETE) != 0) + assert (map->l_type == lt_loaded); + if ((map->l_flags_1 & DF_1_NODELETE) != 0) goto out; /* If the object with the undefined reference cannot be removed ever @@ -197,13 +197,13 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags) } /* If we didn't manage to allocate memory for the list this is - no fatal mistake. We simply increment the use counter of the - referenced object and don't record the dependencies. This - means this increment can never be reverted and the object - will never be unloaded. This is semantically the correct + no fatal mistake. We simply make sure the referenced object + cannot be unloaded. This is semantically the correct behavior. */ if (__builtin_expect (act < undef_map->l_reldepsmax, 1)) undef_map->l_reldeps[undef_map->l_reldepsact++] = map; + else + map->l_flags_1 |= DF_1_NODELETE; /* Display information if we are debugging. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) |