diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-12-31 06:09:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-12-31 06:09:08 +0000 |
commit | c77a447822c8ccc6866216bad737189fff3a0b93 (patch) | |
tree | 83529a631cd6887c71795711ce58620d57bf7d7b /elf/dl-open.c | |
parent | d9af88677f42690b7ad4cacecc7f9b6a62fe50ce (diff) | |
download | glibc-c77a447822c8ccc6866216bad737189fff3a0b93.tar.gz glibc-c77a447822c8ccc6866216bad737189fff3a0b93.tar.xz glibc-c77a447822c8ccc6866216bad737189fff3a0b93.zip |
Update.
2000-12-30 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): We can ignore the NODELETE flag if the object was not yet initialized. 2000-12-28 H.J. Lu <hjl@gnu.org> * elf/dl-deps.c (_dl_map_object_deps): Make sure the DSO state is always consistent even if its dependency is failed. * elf/dl-open.c (_dl_open): Increment the open count before calling _dl_close () in case of failure. * elf/neededtest4.c: New file. * elf/neededobj5.c: New file. * elf/neededobj6.c: New file. * elf/Makefile (distribute): Add neededobj5.c and neededobj6.c. (tests): Add neededtest4. (modules-names): Add neededobj5 and neededobj6. ($(objpfx)neededobj6.so): New target. ($(objpfx)neededtest4): New target. ($(objpfx)neededtest4.out): New target.
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r-- | elf/dl-open.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c index 931e22625c..d1ccfd4ada 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -396,7 +396,17 @@ _dl_open (const char *file, int mode, const void *caller) /* Remove the object from memory. It may be in an inconsistent state if relocation failed, for example. */ if (args.map) - _dl_close (args.map); + { + int i; + + /* Increment open counters for all objects which did not get + correctly loaded. */ + for (i = 0; i < args.map->l_searchlist.r_nlist; ++i) + if (args.map->l_searchlist.r_list[i]->l_opencount == 0) + args.map->l_searchlist.r_list[i]->l_opencount = 1; + + _dl_close (args.map); + } /* Make a local copy of the error string so that we can release the memory allocated for it. */ |