diff options
Diffstat (limited to 'src/exit/exit.c')
-rw-r--r-- | src/exit/exit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exit/exit.c b/src/exit/exit.c index b391f338..bf7835a1 100644 --- a/src/exit/exit.c +++ b/src/exit/exit.c @@ -10,17 +10,17 @@ static void dummy() * as a consequence of linking either __toread.c or __towrite.c. */ weak_alias(dummy, __funcs_on_exit); weak_alias(dummy, __stdio_exit); +weak_alias(dummy, _fini); -extern void _fini() __attribute__((weak)); -extern void (*const __fini_array_start)() __attribute__((weak)); -extern void (*const __fini_array_end)() __attribute__((weak)); +__attribute__((__weak__, __visibility__("hidden"))) +extern void (*const __fini_array_start)(void), (*const __fini_array_end)(void); static void libc_exit_fini(void) { uintptr_t a = (uintptr_t)&__fini_array_end; for (; a>(uintptr_t)&__fini_array_start; a-=sizeof(void(*)())) (*(void (**)())(a-sizeof(void(*)())))(); - if (_fini) _fini(); + _fini(); } weak_alias(libc_exit_fini, __libc_exit_fini); |