diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-03-18 11:11:42 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-03-18 11:11:42 +0000 |
commit | 20fe49b93a8807b7e91732d5a1b21a2d99472793 (patch) | |
tree | 03326dfe9fea0cad1bbb77d4f546584de6c60b5d /elf/dl-lookup.c | |
parent | 193af754dc157708224817fb8ff8914f2fc5e6e1 (diff) | |
download | glibc-20fe49b93a8807b7e91732d5a1b21a2d99472793.tar.gz |
* include/link.h (struct link_map): Remove l_opencount. Add l_removed.
Change type of l_idx to int.
* elf/dl-close.c: Basically rewrite. Do not use l_opencount to
determine whether a DSO has to be unloaded. Instead compute this
in this function.
* elf/dl-deps.c: No need to manipulate l_opencount anymore.
* elf/dl-lookup.c: Likewise.
* elf/rtld.c: Likewise
* elf/dl-open.c: Likewise. Use l_init_called to determine whether
object was just loaded.
* elf/dl-fini.c: Bump l_direct_opencount instead of l_opencount.
* elf/dl-load.c (_dl_map_object_from_fd): Do not recognize DSO which
is about to be unloaded as a match.
(_dl_map_object): Likewise.
* elf/do-lookup.h (do_lookup_x): Do not look into DSO which is about
to be unloaded.
* elf/circleload1.c: Don't use l_opencount anymore.
* elf/neededtest.c: Likewise.
* elf/neededtest2.c: Likewise.
* elf/neededtest3.c: Likewise.
* elf/neededtest4.c: Likewise.
* elf/unload.c: Likewise.
* elf/unload2.c: Likewise.
* elf/loadtest.c: Likewise.
* elf/rtld.c: Preloading errors are now never fatal.
2005-03-08 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile: Add rules to build and run unload5 test.
* elf/unload5.c: New file.
2005-03-08 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile: Add rules to build and run unload4 test.
* elf/unload4.c: New file.
* elf/unload4mod1.c: New file.
* elf/unload4mod2.c: New file.
* elf/unload4mod3.c: New file.
* elf/unload4mod4.c: New file.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r-- | elf/dl-lookup.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 24fc89af10..b3695aeb99 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -91,11 +91,6 @@ add_dependency (struct link_map *undef_map, struct link_map *map) /* Make sure nobody can unload the object while we are at it. */ __rtld_lock_lock_recursive (GL(dl_load_lock)); - /* Don't create cross-reference between modules which are - dynamically loaded by the same dlopen() call. */ - if (undef_map->l_opencount == 0 && map->l_opencount == 0) - goto out; - /* Avoid references to objects which cannot be unloaded anyway. */ if (map->l_type != lt_loaded || (map->l_flags_1 & DF_1_NODELETE) != 0) @@ -107,7 +102,6 @@ add_dependency (struct link_map *undef_map, struct link_map *map) if (undef_map->l_type != lt_loaded || (undef_map->l_flags_1 & DF_1_NODELETE) != 0) { - ++map->l_opencount; map->l_flags_1 |= DF_1_NODELETE; goto out; } @@ -172,19 +166,6 @@ add_dependency (struct link_map *undef_map, struct link_map *map) if (__builtin_expect (act < undef_map->l_reldepsmax, 1)) undef_map->l_reldeps[undef_map->l_reldepsact++] = map; - if (map->l_searchlist.r_list != NULL) - /* And increment the counter in the referenced object. */ - ++map->l_opencount; - else - /* We have to bump the counts for all dependencies since so far - this object was only a normal or transitive dependency. - Now it might be closed with _dl_close() directly. */ - for (list = map->l_initfini; *list != NULL; ++list) - ++(*list)->l_opencount; - - /* As if it is opened through _dl_open. */ - ++map->l_direct_opencount; - /* Display information if we are debugging. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) _dl_debug_printf ("\ |