init: fix init array pointer dereference bullshit
This commit is contained in:
parent
6287cb79be
commit
c24b183c60
2 changed files with 6 additions and 6 deletions
|
@ -22,11 +22,11 @@ __naked __noreturn void handle_reset(void)
|
|||
memmove(&_srelocate, &_etext, (size_t)(&_erelocate) - (size_t)(&_srelocate));
|
||||
memset(&_szero, 0, (size_t)(&_ezero) - (size_t)(&_szero));
|
||||
|
||||
for (uint32_t *fn = &__preinit_array_start; fn != &__preinit_array_end; fn++)
|
||||
( (void (*)(void))fn )();
|
||||
for (uintptr_t *fn = &__preinit_array_start; fn != &__preinit_array_end; fn++)
|
||||
( (void (*)(void))*fn )();
|
||||
|
||||
for (uint32_t *fn = &__init_array_start; fn != &__init_array_end; fn++)
|
||||
( (void (*)(void))fn )();
|
||||
for (uintptr_t *fn = &__init_array_start; fn != &__init_array_end; fn++)
|
||||
( (void (*)(void))*fn )();
|
||||
|
||||
/* start the Kernel */
|
||||
main();
|
||||
|
|
|
@ -60,9 +60,9 @@ extern uintptr_t __preinit_array_end;
|
|||
* standard C library. They are executed after the preinit array, so memory
|
||||
* allocation is already available.
|
||||
*/
|
||||
extern uint32_t __init_array_start;
|
||||
extern uintptr_t __init_array_start;
|
||||
/** @brief End of init array. */
|
||||
extern uint32_t __init_array_end;
|
||||
extern uintptr_t __init_array_end;
|
||||
|
||||
/*
|
||||
* This file is part of Ardix.
|
||||
|
|
Loading…
Reference in a new issue