libstdcpp.cpp 505 B

12345678910111213141516171819202122232425
  1. #include <assert.h>
  2. #include <types/types.h>
  3. #include <kernel/log.hpp>
  4. extern "C" void NORETURN __stack_chk_fail(void) {
  5. assert(false);
  6. for (;;)
  7. ;
  8. }
  9. extern "C" void NORETURN __cxa_pure_virtual(void) {
  10. assert(false);
  11. for (;;)
  12. ;
  13. }
  14. void NORETURN __assert_fail(const char* statement, const char* file, int line, const char* func) {
  15. (void)statement, (void)file, (void)line, (void)func;
  16. for (;;)
  17. asm volatile(
  18. "cli\n\t"
  19. "hlt\n\t");
  20. }