From 23e5a4e35a5f5ff7e2f28e7bf7c023124a496b74 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sat, 24 Apr 2021 17:17:30 +0200 Subject: [PATCH] overwrite entry point --- src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d774d11..6a525d9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,14 @@ #![no_std] - +#![no_main] use core::panic::PanicInfo; -fn main() {} +/// Disabling mangling ensures the compiler returns a function named `_start` +/// +/// We tell the compiler to use `C calling convention` +#[no_mangle] +pub extern "C" fn _start() -> ! { + loop {} +} /// Function called on panic. It is a diverging function with a `never` return type. /// /// # Arguments