Max OS 0.3
Loading...
Searching...
No Matches
cplusplus.h
Go to the documentation of this file.
1
11#ifndef MAXOS_RUNTIME_CPLUSPLUS_H
12#define MAXOS_RUNTIME_CPLUSPLUS_H
13
14#include <cstdint>
15
16
17namespace MaxOS::runtime {
18
19 typedef void (* constructor)();
20 typedef unsigned uarch_t;
21
22 extern "C" {
23
29 void (* destructor_func)(void*);
30 void* obj_ptr;
31 void* dso_handle;
32 };
33
42 int __cxa_atexit(void (* f)(void*), void* objptr, void* dso);
43
49 void __cxa_finalize(void* f);
50
52 uintptr_t __stack_chk_guard = 0x595e9fbd94fda766;
53
57 void __stack_chk_fail(void);
58 }
59}
60
61
62#endif // MAXOS_RUNTIME_CPLUSPLUS_H
unsigned uarch_t
An unsigned architecture specific type.
Definition cplusplus.h:20
void __stack_chk_fail(void)
Called when a stack buffer overflow is detected.
uintptr_t __stack_chk_guard
The stack canary value used to detect stack buffer overflows (.
Definition cplusplus.h:52
int __cxa_atexit(void(*f)(void *), void *objptr, void *dso)
Register a function to be called at program exit.
void __cxa_finalize(void *f)
Finalise all global objects by calling their destructors.
An entry in the list of functions to call at program exit (not used in kernel but needed for linking)
Definition cplusplus.h:28
void * dso_handle
The DSO handle (not used)
Definition cplusplus.h:31
void * obj_ptr
The pointer to the object to destroy.
Definition cplusplus.h:30
void(* destructor_func)(void *)
The destructor function to call.
Definition cplusplus.h:29