9 /* atexit.c and __stdio_exit.c override these. the latter is linked
10 * as a consequence of linking either __toread.c or __towrite.c. */
11 weak_alias(dummy, __funcs_on_exit);
12 weak_alias(dummy, __stdio_exit);
15 weak_alias(dummy, _fini);
16 extern void (*const __fini_array_start)() __attribute__((weak));
17 extern void (*const __fini_array_end)() __attribute__((weak));
20 _Noreturn void exit(int code)
25 uintptr_t a = (uintptr_t)&__fini_array_end;
26 for (; a>(uintptr_t)&__fini_array_start; a-=sizeof(void(*)()))
27 (*(void (**)())(a-sizeof(void(*)())))();