aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--StrixKernel/src/main.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/StrixKernel/src/main.rs b/StrixKernel/src/main.rs
index bf1dfba..3d9e5f8 100644
--- a/StrixKernel/src/main.rs
+++ b/StrixKernel/src/main.rs
@@ -1,13 +1,19 @@
// main.rs
-#![no_std]
+#![no_std] // don't link the Rust standard library
+#![no_main] // disable all Rust-level entry points
use core::panic::PanicInfo;
+#[unsafe(no_mangle)] // don't mangle the name of this function
+pub extern "C" fn _start() -> ! {
+ // this function is the entry point, since the linker looks for a function
+ // named `_start` by default
+ loop {}
+}
+
/// This function is called on panic.
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
-
-fn main() {}