mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibC: Move even more methods and globals out of crt0.o
This commit is contained in:
parent
9681d41bf0
commit
4cb7c8ea85
3 changed files with 40 additions and 27 deletions
34
Libraries/LibC/libcinit.cpp
Normal file
34
Libraries/LibC/libcinit.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <AK/Types.h>
|
||||
#include <assert.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
__thread int errno;
|
||||
char** environ;
|
||||
bool __environ_is_malloced;
|
||||
|
||||
void __libc_init()
|
||||
{
|
||||
void __malloc_init();
|
||||
__malloc_init();
|
||||
|
||||
void __stdio_init();
|
||||
__stdio_init();
|
||||
}
|
||||
|
||||
[[noreturn]] void __cxa_pure_virtual() __attribute__((weak));
|
||||
|
||||
[[noreturn]] void __cxa_pure_virtual()
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
extern u32 __stack_chk_guard;
|
||||
u32 __stack_chk_guard = (u32)0xc0000c13;
|
||||
|
||||
[[noreturn]] void __stack_chk_fail()
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue