From 68adc1910bb5ce00cbeab933042e9f89a37549fc Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 28 Oct 2025 13:21:37 +0800 Subject: [PATCH] xous: fix unwinding and unused symbol errors The unwinding feature is called `panic-unwind` and not `panic_unwind`. Adjust the feature gate to look for these values. Additionally, the `abort_internal()` call is no longer used. Signed-off-by: Sean Cross --- library/std/src/sys/pal/xous/mod.rs | 6 ------ library/std/src/sys/pal/xous/os.rs | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/library/std/src/sys/pal/xous/mod.rs b/library/std/src/sys/pal/xous/mod.rs index 077cff1ee0f2..19575220b22e 100644 --- a/library/std/src/sys/pal/xous/mod.rs +++ b/library/std/src/sys/pal/xous/mod.rs @@ -1,14 +1,8 @@ #![forbid(unsafe_op_in_unsafe_fn)] -use crate::os::xous::ffi::exit; - pub mod os; pub mod time; #[path = "../unsupported/common.rs"] mod common; pub use common::*; - -pub fn abort_internal() -> ! { - exit(101); -} diff --git a/library/std/src/sys/pal/xous/os.rs b/library/std/src/sys/pal/xous/os.rs index d9b8418e6c33..2da711f89dfa 100644 --- a/library/std/src/sys/pal/xous/os.rs +++ b/library/std/src/sys/pal/xous/os.rs @@ -11,7 +11,7 @@ static PARAMS_ADDRESS: Atomic<*mut u8> = AtomicPtr::new(core::ptr::null_mut()); #[cfg(not(test))] -#[cfg(feature = "panic_unwind")] +#[cfg(feature = "panic-unwind")] mod eh_unwinding { pub(crate) struct EhFrameFinder; pub(crate) static mut EH_FRAME_ADDRESS: usize = 0; @@ -45,7 +45,7 @@ pub extern "C" fn abort() { #[unsafe(no_mangle)] pub extern "C" fn _start(eh_frame: usize, params_address: usize) { - #[cfg(feature = "panic_unwind")] + #[cfg(feature = "panic-unwind")] { unsafe { super::eh_unwinding::EH_FRAME_ADDRESS = eh_frame }; unwind::set_custom_eh_frame_finder(&super::eh_unwinding::EH_FRAME_SETTINGS).ok();