浏览代码

Kernel: Group C++ ABI functions together

As suggested in #3096.
Ben Wiederhake 4 年之前
父节点
当前提交
8a41ce5cc7
共有 2 个文件被更改,包括 7 次插入6 次删除
  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();
     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;
 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
 // If we actually call these something has gone horribly wrong
 void* __dso_handle __attribute__((visibility("hidden")));
 void* __dso_handle __attribute__((visibility("hidden")));
 
 
-extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
 }
 }