diff --git a/src/main.rs b/src/main.rs index b701c04..abbfa97 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ mod uart; #[naked] #[no_mangle] #[link_section = ".text.init"] -unsafe extern "C" fn _start() -> ! { +unsafe extern "C" fn _enter() -> ! { use core::arch::asm; asm!( // before we use the `la` pseudo-instruction for the first time, @@ -35,14 +35,14 @@ unsafe extern "C" fn _start() -> ! { "2:", // BSS is clear! - // "tail-call" to {entry} (call without saving a return address) - "tail {entry}", - entry = sym entry, // {entry} refers to the function [entry] below + // "tail-call" to {start} (call without saving a return address) + "tail {start}", + start = sym start, // {start} refers to the function [start] below options(noreturn) // we must handle "returning" from assembly ); } -extern "C" fn entry() -> ! { +extern "C" fn start() -> ! { // UNSAFE: Called exactly once, right here. unsafe { heap::init() }; diff --git a/src/script.ld b/src/script.ld index 3aad866..916ccaf 100644 --- a/src/script.ld +++ b/src/script.ld @@ -1,7 +1,7 @@ # src/script.ld OUTPUT_ARCH("riscv") -ENTRY(_start) +ENTRY(_enter) MEMORY { ram (wxa) : ORIGIN = 0x80000000, LENGTH = 128M