Implement support for `std::terminate` via `::abort`
Since we are running without exception support (-fno-exceptions
), functions that would throw an exception will instead call std::terminate
. The default terminate-handler calls std::abort
(which is ::abort
). However, the newlib implementation of ::abort
want to do the right thing and thus calls some functions we currently don't have. This change introduces an implementation that overrides the ::abort
weak symbol and simply teachos::arch::exception_handling::panic
s. Additionally, the halting code is now consolidated in teachos::arch::kernel::halt
, so that we can get rid of some nasty tricks.