From a49098b831bbcb3156df46465d958b73db0f06e5 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Fri, 10 Jan 2025 15:46:40 +0800 Subject: [PATCH] add dummy personality funcs --- src/runtime/src/main.rs | 6 ++++++ src/satman/src/main.rs | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/runtime/src/main.rs b/src/runtime/src/main.rs index dd24e25..2abfae0 100644 --- a/src/runtime/src/main.rs +++ b/src/runtime/src/main.rs @@ -4,6 +4,7 @@ #![feature(alloc_error_handler)] #![feature(const_btree_new)] #![feature(panic_info_message)] +#![feature(lang_items)] #[macro_use] extern crate alloc; @@ -43,6 +44,11 @@ extern "C" { static __exceptions_start: u32; } +// linker may complain about missing rust_eh_personality but it is unused +#[lang = "eh_personality"] +#[allow(unused)] +pub fn dummy_personality() { } + #[cfg(all(feature = "target_kasli_soc", has_virtual_leds))] async fn io_expanders_service( i2c_bus: RefCell<&mut libboard_zynq::i2c::I2c>, diff --git a/src/satman/src/main.rs b/src/satman/src/main.rs index 1d908e5..dced84c 100644 --- a/src/satman/src/main.rs +++ b/src/satman/src/main.rs @@ -1,6 +1,6 @@ #![no_std] #![no_main] -#![feature(alloc_error_handler, never_type, panic_info_message)] +#![feature(alloc_error_handler, never_type, panic_info_message, lang_items)] #[macro_use] extern crate log; @@ -61,6 +61,11 @@ extern "C" { static __exceptions_start: u32; } +// linker may complain about missing rust_eh_personality but it is unused +#[lang = "eh_personality"] +#[allow(unused)] +pub fn dummy_personality() { } + fn drtiosat_reset(reset: bool) { unsafe { csr::drtiosat::reset_write(if reset { 1 } else { 0 });