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#include <libcommon/assert.h>
17
18namespace MaxOS::runtime {
19
20 typedef void (* constructor)();
21 typedef unsigned uarch_t;
22
23 extern "C" {
24
30 void (* destructor_func)(void*);
31 void* obj_ptr;
32 void* dso_handle;
33 };
34
43 int __cxa_atexit(void (* f)(void*), void* objptr, void* dso);
44
50 void __cxa_finalize(void* f);
51
53 uintptr_t __stack_chk_guard = 0x595e9fbd94fda766;
54
58 void __stack_chk_fail(void);
59 }
60}
61
62
63#endif // MAXOS_RUNTIME_CPLUSPLUS_H
unsigned uarch_t
An unsigned architecture specific type.
Definition cplusplus.h:21
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:53
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:29
void * dso_handle
The DSO handle (not used)
Definition cplusplus.h:32
void * obj_ptr
The pointer to the object to destroy.
Definition cplusplus.h:31
void(* destructor_func)(void *)
The destructor function to call.
Definition cplusplus.h:30