summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-11-13 15:49:27 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-12-12 09:53:23 -0300
commit5dcd2d0ad02ff12c76355ef4f40947c1857ac482 (patch)
tree5e473c3d5effa474bf5a93343b9d84f1a77a2c19 /stdlib
parentd4facb63ff0349b3c2a83df7363f23a2dbd64a17 (diff)
downloadglibc-5dcd2d0ad02ff12c76355ef4f40947c1857ac482.tar.gz
glibc-5dcd2d0ad02ff12c76355ef4f40947c1857ac482.tar.xz
glibc-5dcd2d0ad02ff12c76355ef4f40947c1857ac482.zip
stdlib: Move _IO_cleanup to call_function_static_weak
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/exit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/stdlib/exit.c b/stdlib/exit.c
index 10c44e1449..98579fbda8 100644
--- a/stdlib/exit.c
+++ b/stdlib/exit.c
@@ -20,11 +20,9 @@
 #include <unistd.h>
 #include <pointer_guard.h>
 #include <libc-lock.h>
+#include <libio/libioP.h>
 #include "exit.h"
 
-#include "set-hooks.h"
-DEFINE_HOOK (__libc_atexit, (void))
-
 /* Initialize the flag that indicates exit function processing
    is complete. See concurrency notes in stdlib/exit.h where
    __exit_funcs_lock is declared.  */
@@ -128,7 +126,7 @@ __run_exit_handlers (int status, struct exit_function_list **listp,
   __libc_lock_unlock (__exit_funcs_lock);
 
   if (run_list_atexit)
-    RUN_HOOK (__libc_atexit, ());
+    call_function_static_weak (_IO_cleanup);
 
   _exit (status);
 }