fix warnings, give empty section if nothing found
This commit is contained in:
parent
93bd98f6c0
commit
d080c65519
@ -5,7 +5,6 @@ use alloc::borrow::ToOwned;
|
||||
use log::{debug, info, error};
|
||||
use cslice::CSlice;
|
||||
|
||||
use libregister::RegisterR;
|
||||
use libcortex_a9::{
|
||||
enable_fpu,
|
||||
cache::{dcci_slice, iciallu, bpiall},
|
||||
@ -220,7 +219,7 @@ extern fn dl_unwind_find_exidx(pc: *const u32, len_ptr: *mut u32) -> *const u32
|
||||
let length;
|
||||
let start: *const EXIDX_Entry;
|
||||
unsafe {
|
||||
if (&__text_start as *const u32 <= pc && pc < &__text_end as *const u32) {
|
||||
if &__text_start as *const u32 <= pc && pc < &__text_end as *const u32 {
|
||||
length = (&__exidx_end as *const EXIDX_Entry).offset_from(&__exidx_start) as u32;
|
||||
start = &__exidx_start;
|
||||
} else if KERNEL_IMAGE != ptr::null() {
|
||||
@ -230,8 +229,8 @@ extern fn dl_unwind_find_exidx(pc: *const u32, len_ptr: *mut u32) -> *const u32
|
||||
length = exidx.len() as u32;
|
||||
start = exidx.as_ptr();
|
||||
} else {
|
||||
*len_ptr = 0;
|
||||
return 0 as *const u32;
|
||||
length = 0;
|
||||
start = ptr::null();
|
||||
}
|
||||
*len_ptr = length;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user