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 <sean@xobs.io>
This commit is contained in:
Sean Cross 2025-10-28 13:21:37 +08:00 committed by Sean Cross
parent e7d44143a1
commit 68adc1910b
2 changed files with 2 additions and 8 deletions

View file

@ -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);
}

View file

@ -11,7 +11,7 @@ pub(crate) mod params;
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 @@ mod c_compat {
#[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();