From c031887028e7981c97d24b6abc037677197c3482 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 20 Apr 2024 09:00:34 +0200 Subject: [PATCH] We don't need to make sure the main function is in a certain memory region --- src/link.ld | 3 --- src/main.cpp | 1 - 2 files changed, 4 deletions(-) diff --git a/src/link.ld b/src/link.ld index c88244b..4fca7c4 100644 --- a/src/link.ld +++ b/src/link.ld @@ -6,8 +6,6 @@ SECTIONS { . = 0x00808000; .text : { *(.kernel_code*); - *(.start_code*); - start_code_end = .; /* everything below this code may get overwritten at runtime */ *(.text*); /* Tell linker to not garbage collect this section as it is not referenced anywhere */ @@ -27,4 +25,3 @@ SECTIONS { } ASSERT((SIZEOF(.text) + SIZEOF(.data)) < (0x00900000 - 0x00808000), "elf is too big"); -ASSERT(start_code_end <= 0x00809000, "start_code section is too big"); \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 889d45d..184300f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -64,7 +64,6 @@ bool CheckRunning() { extern "C" void init_wut(); extern "C" void fini_wut(); -extern "C" int _start(int argc, char **argv) __attribute__((section(".start_code"))); extern "C" int _start(int argc, char **argv) { doKernelSetup(); InitFunctionPointers();