LibC: Move even more methods and globals out of crt0.o

This commit is contained in:
Andrew Kaster 2020-01-09 00:36:32 -07:00 committed by Andreas Kling
commit 4cb7c8ea85
Notes: sideshowbarker 2024-07-19 10:05:22 +09:00
3 changed files with 40 additions and 27 deletions

View 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();
}
}