Max OS 0.3
Loading...
Searching...
No Matches
cplusplus.cpp
Go to the documentation of this file.
1
9#include <runtime/cplusplus.h>
10#include <common/logger.h>
11
12using namespace MaxOS;
13using namespace MaxOS::runtime;
14
16extern "C" void* __dso_handle;
17
21extern "C" void __cxa_pure_virtual() {
22 ASSERT(false, "Pure virtual function call failed");
23}
24
28extern "C" void __stack_chk_fail(void)
29{
30 ASSERT(false, "Stack Smashed");
31}
32
35
39extern "C" void call_constructors() {
40 // Loop through and initialise all the global constructorsu
41 for (constructor* i = &start_ctors; i != &end_ctors; i++)
42 (*i)();
43}
44
constructor start_ctors
Pointer to the start of the constructors section.
Definition cplusplus.cpp:33
void * __dso_handle
Define static constructors (DSO = Dynamic Shared Object)
Definition cplusplus.cpp:16
void __cxa_pure_virtual()
Called when a virtual function is called on an object with no implementation.
Definition cplusplus.cpp:21
void call_constructors()
Calls all global constructors.
Definition cplusplus.cpp:39
constructor end_ctors
Pointer to the end of the constructors section.
Definition cplusplus.cpp:34
Defines C++ runtime functions and structures needed for linking C++ code in the kernel.
void __stack_chk_fail(void)
Called when a stack buffer overflow is detected.
void(* constructor)()
A pointer to a constructor function.
Definition cplusplus.h:19
Defines a Logger class for logging messages with different severity levels to multiple output streams...
#define ASSERT(condition, format,...)
If the specified condition is not met then the kernel will crash with the specified message.
Definition logger.h:100