generic-rt: remove use of core instrinsics

Fixes warning about not using compiler intrinsics.

Calls into the `panic` macro instead of directly calling the `abort`
intrinsic.

Slightly changes the behavior of the function by printing the
panic message, unwinding, and aborting.
This commit is contained in:
elle
2025-09-07 20:23:02 +00:00
parent 01c8942a3c
commit 6b9103a5ec
+2 -5
View File
@@ -1,5 +1,4 @@
#![no_std]
#![feature(core_intrinsics)]
use core::{
arch::asm,
@@ -92,10 +91,8 @@ impl<Os> GenericTcb<Os> {
Some(&mut *Self::current_ptr()?)
}
}
pub fn panic_notls(_msg: impl core::fmt::Display) -> ! {
//eprintln!("panicked in ld.so: {}", msg);
core::intrinsics::abort();
pub fn panic_notls(msg: impl core::fmt::Display) -> ! {
panic!("panicked in ld.so: {msg}");
}
pub trait ExpectTlsFree {