2023-07-22 14:30:04 +00:00
|
|
|
|
2023-07-22 15:23:39 +00:00
|
|
|
|
|
|
|
int __stack_chk_fial() {
|
|
|
|
// TODO: implement proper stack protector support
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-07-22 14:30:04 +00:00
|
|
|
void __libc_start_main(
|
|
|
|
int (*main)(int, char**, char**),
|
|
|
|
int argc, char **argv,
|
|
|
|
int (*init)(int, char**, char**),
|
|
|
|
void (*fini)(void),
|
|
|
|
void (*rtld_fini)(void),
|
|
|
|
void *stack_end
|
|
|
|
) {
|
2023-07-22 15:23:39 +00:00
|
|
|
static char string[] = "Hello, world!\n";
|
|
|
|
syscall_write(STDOUT_FILENO, string, sizeof string);
|
2023-07-22 14:30:04 +00:00
|
|
|
syscall_exit(0);
|
|
|
|
}
|