From 124e025864bb39732c71fc60c1443d5680881a0a Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 26 Jun 2018 15:13:54 +0200 Subject: Run thread shutdown functions in an explicit order This removes the __libc_thread_subfreeres hook in favor of explict calls. Reviewed-by: Carlos O'Donell --- sysdeps/mach/strerror_l.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sysdeps/mach/strerror_l.c') diff --git a/sysdeps/mach/strerror_l.c b/sysdeps/mach/strerror_l.c index 61515a46b8..b9842ccf40 100644 --- a/sysdeps/mach/strerror_l.c +++ b/sysdeps/mach/strerror_l.c @@ -87,15 +87,9 @@ strerror_l (int errnum, locale_t loc) } -#ifdef _LIBC -# ifdef _LIBC_REENTRANT -/* This is called when a thread is exiting to free the last_value string. */ -static void __attribute__ ((section ("__libc_thread_freeres_fn"))) -strerror_thread_freeres (void) +void +__strerror_thread_freeres (void) { free (last_value); } -text_set_element (__libc_thread_subfreeres, strerror_thread_freeres); -text_set_element (__libc_subfreeres, strerror_thread_freeres); -# endif -#endif +text_set_element (__libc_subfreeres, __strerror_thread_freeres); -- cgit v1.2.3