mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user