From 6333a6014f32c7ced36ced610d5a5cecbafba6c3 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 4 Sep 2023 20:03:37 +0200 Subject: __call_tls_dtors: Use call_function_static_weak --- stdlib/exit.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'stdlib') diff --git a/stdlib/exit.c b/stdlib/exit.c index d6c188b..0cf9bf7 100644 --- a/stdlib/exit.c +++ b/stdlib/exit.c @@ -37,11 +37,8 @@ __run_exit_handlers (int status, struct exit_function_list **listp, bool run_list_atexit, bool run_dtors) { /* First, call the TLS destructors. */ -#ifndef SHARED - if (&__call_tls_dtors != NULL) -#endif - if (run_dtors) - __call_tls_dtors (); + if (run_dtors) + call_function_static_weak (__call_tls_dtors); __libc_lock_lock (__exit_funcs_lock); -- cgit v1.1