Index: glibc-2.22/elf/dl-close.c =================================================================== --- glibc-2.22.orig/elf/dl-close.c +++ glibc-2.22/elf/dl-close.c @@ -152,14 +152,6 @@ _dl_close_worker (struct link_map *map, l->l_idx = idx; maps[idx] = l; ++idx; - - /* Clear DF_1_NODELETE to force object deletion. We don't need to touch - l_tls_dtor_count because forced object deletion only happens when an - error occurs during object load. Destructor registration for TLS - non-POD objects should not have happened till then for this - object. */ - if (force) - l->l_flags_1 &= ~DF_1_NODELETE; } assert (idx == nloaded);