From 2e689eb5d44e027e4bbc1eb262bafae95ff161e6 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:27:23 +0200 Subject: [PATCH] Remove unnecessary no_mangle and extern "C" from the panic handler #[panic_handler] handles all linkage related details. --- src/panic.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/panic.rs b/src/panic.rs index cbdcb44d19..d0ae67faa2 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -6,8 +6,7 @@ use crate::{cpu_id, context, interrupt, syscall}; /// Required to handle panics #[panic_handler] -#[no_mangle] -pub extern "C" fn rust_begin_unwind(info: &PanicInfo) -> ! { +fn rust_begin_unwind(info: &PanicInfo) -> ! { println!("KERNEL PANIC: {}", info); unsafe { interrupt::stack_trace(); }