mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 02:53:23 +00:00
feat: update to new backtrace lib (#1049)
* feat: update to new backtrace lib * feat: enable unwind for riscv64 --------- Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -28,6 +28,7 @@ SECTIONS
|
||||
|
||||
. = ALIGN(4096);
|
||||
text_start_pa = .;
|
||||
__executable_start = .;
|
||||
.text (text_start_pa): AT(text_start_pa - KERNEL_VMA)
|
||||
{
|
||||
_text = .;
|
||||
@ -39,6 +40,7 @@ SECTIONS
|
||||
*(.text.*)
|
||||
|
||||
_etext = .;
|
||||
__etext = .;
|
||||
}
|
||||
. = ALIGN(32768);
|
||||
data_start_pa = .;
|
||||
|
28
kernel/src/arch/riscv64/riscv64gc-unknown-none-elf.json
Normal file
28
kernel/src/arch/riscv64/riscv64gc-unknown-none-elf.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"arch": "riscv64",
|
||||
"code-model": "medium",
|
||||
"cpu": "generic-rv64",
|
||||
"crt-objects-fallback": "false",
|
||||
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
|
||||
"eh-frame-header": false,
|
||||
"emit-debug-gdb-scripts": false,
|
||||
"features": "+m,+a,+f,+d,+c",
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "gnu-lld",
|
||||
"llvm-abiname": "lp64d",
|
||||
"llvm-target": "riscv64",
|
||||
"max-atomic-width": 64,
|
||||
"metadata": {
|
||||
"description": "Bare RISC-V (RV64IMAFDC ISA)",
|
||||
"host_tools": false,
|
||||
"std": false,
|
||||
"tier": 2
|
||||
},
|
||||
"panic-strategy": "unwind",
|
||||
"relocation-model": "static",
|
||||
"supported-sanitizers": [
|
||||
"shadow-call-stack",
|
||||
"kernel-address"
|
||||
],
|
||||
"target-pointer-width": "64"
|
||||
}
|
@ -36,7 +36,8 @@ pub(super) fn syscall_handler(syscall_num: usize, frame: &mut TrapFrame) -> () {
|
||||
|
||||
let args = [frame.a0, frame.a1, frame.a2, frame.a3, frame.a4, frame.a5];
|
||||
syscall_return!(
|
||||
Syscall::handle(syscall_num, &args, frame).unwrap_or_else(|e| e.to_posix_errno() as usize),
|
||||
Syscall::catch_handle(syscall_num, &args, frame)
|
||||
.unwrap_or_else(|e| e.to_posix_errno() as usize),
|
||||
frame,
|
||||
false
|
||||
);
|
||||
|
@ -26,6 +26,7 @@ SECTIONS
|
||||
. = ALIGN(32768);
|
||||
. += KERNEL_VMA;
|
||||
text_start_pa = .;
|
||||
__executable_start = .;
|
||||
.text (text_start_pa): AT(text_start_pa - KERNEL_VMA)
|
||||
{
|
||||
_text = .;
|
||||
@ -37,6 +38,7 @@ SECTIONS
|
||||
*(.text.*)
|
||||
|
||||
_etext = .;
|
||||
__etext = .;
|
||||
}
|
||||
. = ALIGN(32768);
|
||||
data_start_pa = .;
|
||||
|
@ -118,8 +118,8 @@ pub extern "sysv64" fn syscall_handler(frame: &mut TrapFrame) {
|
||||
_ => {}
|
||||
}
|
||||
syscall_return!(
|
||||
Syscall::handle(syscall_num, &args, frame).unwrap_or_else(|e| e.to_posix_errno() as usize)
|
||||
as u64,
|
||||
Syscall::catch_handle(syscall_num, &args, frame)
|
||||
.unwrap_or_else(|e| e.to_posix_errno() as usize) as u64,
|
||||
frame,
|
||||
show
|
||||
);
|
||||
|
@ -11,5 +11,5 @@
|
||||
"executables": true,
|
||||
"features": "-mmx,-sse,+soft-float",
|
||||
"disable-redzone": true,
|
||||
"panic-strategy": "abort"
|
||||
"panic-strategy": "unwind"
|
||||
}
|
||||
|
Reference in New Issue
Block a user