diff --git a/libc/stdlib.cpp b/libc/stdlib.cpp index b500d27f56..9f30fd09d5 100644 --- a/libc/stdlib.cpp +++ b/libc/stdlib.cpp @@ -4,6 +4,8 @@ #include #include +extern "C" void _fini(); + void abort(void) { ASSERT_NOT_REACHED(); @@ -11,6 +13,7 @@ void abort(void) void exit(int status) { + _fini(); _exit(status); ASSERT_NOT_REACHED(); }