about summary refs log tree commit diff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 8b352d0f47..e1ca142a69 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -62,7 +62,9 @@ _dl_close (struct link_map *map)
     {
       struct link_map *imap = list[i];
       if (imap->l_opencount == 1 && imap->l_type == lt_loaded
-	  && imap->l_info[DT_FINI])
+	  && imap->l_info[DT_FINI]
+	  /* Skip any half-cooked objects that were never initialized.  */
+	  && imap->l_init_called)
 	{
 	  /* When debugging print a message first.  */
 	  if (_dl_debug_impcalls)