about summary refs log tree commit diff
path: root/elf/dl-fini.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-24 10:46:15 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-02-01 14:49:46 -0300
commit5fa11a2bc94c912c3b25860065086902674537ba (patch)
tree224bd21e784971cb75433abdd999b91cb05dd732 /elf/dl-fini.c
parent7e0ad15c0fbfe25435c1acd0ed3e9cedfbff2488 (diff)
downloadglibc-5fa11a2bc94c912c3b25860065086902674537ba.tar.gz
glibc-5fa11a2bc94c912c3b25860065086902674537ba.tar.xz
glibc-5fa11a2bc94c912c3b25860065086902674537ba.zip
elf: Add la_activity during application exit
la_activity is not called during application exit, even though
la_objclose is.

Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'elf/dl-fini.c')
-rw-r--r--elf/dl-fini.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index de8eb1b3c9..030b1fcbcd 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -64,6 +64,10 @@ _dl_fini (void)
 	__rtld_lock_unlock_recursive (GL(dl_load_lock));
       else
 	{
+#ifdef SHARED
+	  _dl_audit_activity_nsid (ns, LA_ACT_DELETE);
+#endif
+
 	  /* Now we can allocate an array to hold all the pointers and
 	     copy the pointers in.  */
 	  struct link_map *maps[nloaded];
@@ -153,6 +157,10 @@ _dl_fini (void)
 	      /* Correct the previous increment.  */
 	      --l->l_direct_opencount;
 	    }
+
+#ifdef SHARED
+	  _dl_audit_activity_nsid (ns, LA_ACT_CONSISTENT);
+#endif
 	}
     }