Merge branch 'panic_abort' into 'master'
Build the kernel with panic=abort See merge request redox-os/kernel!229
This commit is contained in:
@@ -6,4 +6,3 @@ rustflags = [
|
||||
|
||||
[unstable]
|
||||
build-std = ["core", "alloc", "compiler_builtins"]
|
||||
build-std-features = ["panic-unwind"]
|
||||
|
||||
@@ -61,8 +61,14 @@ slab = ["slab_allocator"]
|
||||
x86_fsgsbase = []
|
||||
|
||||
[profile.dev]
|
||||
# Avoids having to define the eh_personality lang item and reduces kernel size
|
||||
panic = "abort"
|
||||
|
||||
# Kernel doesn't yet work great with debug mode :(
|
||||
opt-level = 3
|
||||
|
||||
[profile.release]
|
||||
# Avoids having to define the eh_personality lang item and reduces kernel size
|
||||
panic = "abort"
|
||||
|
||||
lto = true
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#![feature(concat_idents)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(integer_atomics)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(ptr_internals)]
|
||||
#![feature(slice_ptr_get, slice_ptr_len)]
|
||||
|
||||
@@ -5,10 +5,6 @@ use core::panic::PanicInfo;
|
||||
|
||||
use crate::{cpu_id, context, interrupt, syscall};
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_eh_personality() {}
|
||||
|
||||
/// Required to handle panics
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
@@ -44,12 +40,3 @@ pub extern "C" fn rust_begin_unwind(info: &PanicInfo) -> ! {
|
||||
pub extern fn rust_oom(_layout: Layout) -> ! {
|
||||
panic!("kernel memory allocation failed");
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[no_mangle]
|
||||
/// Required to handle panics
|
||||
pub extern "C" fn _Unwind_Resume() -> ! {
|
||||
loop {
|
||||
unsafe { interrupt::halt(); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user