diff --git a/src/link.ld b/src/link.ld index 3624909..1fcfe61 100644 --- a/src/link.ld +++ b/src/link.ld @@ -6,6 +6,7 @@ SECTIONS { . = 0x00808000; .text : { *(.kernel_code*); + *(.start_code*); *(.text*); /* Tell linker to not garbage collect this section as it is not referenced anywhere */ KEEP(*(.kernel_code*)); diff --git a/src/main.cpp b/src/main.cpp index dea3ee8..8767706 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,6 +76,8 @@ bool module_log = false; bool udp_log = false; bool cafe_log = false; #endif // DEBUG + +extern "C" int _start(int argc, char **argv) __attribute__ ((section (".start_code"))); extern "C" int _start(int argc, char **argv) { doKernelSetup(); InitFunctionPointers();