Make sure _start is at the beginning of the .text section.

This commit is contained in:
Maschell 2022-01-21 18:51:56 +01:00
parent 923b43072c
commit 00fe4bc284
2 changed files with 3 additions and 0 deletions

View File

@ -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*));

View File

@ -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();