mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-25 17:15:42 +02:00
Kernel: Remove __dso_handle and __cxa_atexit()
Defining __cxa_atexit() and declaring __dso_handle doesn't seem to be necessary anymore. Nothing in the kernel should use static destructors. Previously, causing a static destructor to be called failed to link with "hidden symbol `__dso_handle' isn't defined". Now you additionally get this error: "undefined reference to `__cxa_atexit".
This commit is contained in:
@@ -452,8 +452,4 @@ UNMAP_AFTER_INIT void setup_serial_debug()
|
||||
}
|
||||
}
|
||||
|
||||
// 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")));
|
||||
|
||||
}
|
||||
|
||||
@@ -229,7 +229,6 @@ void const* memmem(void const* haystack, size_t haystack_length, void const* nee
|
||||
// Declare them first, to tell the silly compiler that they are indeed being used.
|
||||
[[noreturn]] void __stack_chk_fail() __attribute__((used));
|
||||
[[noreturn]] void __stack_chk_fail_local() __attribute__((used));
|
||||
extern "C" int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
[[noreturn]] void __cxa_pure_virtual();
|
||||
|
||||
[[noreturn]] void __stack_chk_fail()
|
||||
@@ -242,12 +241,6 @@ extern "C" int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
[[noreturn]] void __cxa_pure_virtual()
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
|
||||
@@ -256,8 +256,4 @@ extern "C" [[noreturn]] void init()
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
// 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")));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user