Jelajahi Sumber

Kernel: Group C++ ABI functions together

As suggested in #3096.
Ben Wiederhake 4 tahun lalu
induk
melakukan
8a41ce5cc7
2 mengubah file dengan 7 tambahan dan 6 penghapusan
  1. 6 0
      Kernel/StdLib.cpp
  2. 1 6
      Kernel/init.cpp

+ 6 - 0
Kernel/StdLib.cpp

@@ -306,4 +306,10 @@ void free(void* p)
 {
     ASSERT_NOT_REACHED();
 }
+
+extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
+{
+    ASSERT_NOT_REACHED();
+    return 0;
+}
 }

+ 1 - 6
Kernel/init.cpp

@@ -381,13 +381,8 @@ extern "C" {
 multiboot_info_t* multiboot_info_ptr;
 }
 
-// Define some Itanium C++ ABI methods to stop the linker from complaining
+// Define some Itanium C++ ABI methods to stop the linker from complaining.
 // If we actually call these something has gone horribly wrong
 void* __dso_handle __attribute__((visibility("hidden")));
 
-extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
 }