From 8a41ce5cc7888478f35ce87e27be4a540dcaeea1 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Tue, 11 Aug 2020 23:37:27 +0200 Subject: [PATCH] Kernel: Group C++ ABI functions together As suggested in #3096. --- Kernel/StdLib.cpp | 6 ++++++ Kernel/init.cpp | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Kernel/StdLib.cpp b/Kernel/StdLib.cpp index 54cb6b109e..a16d58f547 100644 --- a/Kernel/StdLib.cpp +++ b/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; +} } diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 69db9f9efd..9e0713c4a9 100644 --- a/Kernel/init.cpp +++ b/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; -} }