调整符号名称

ch1
zhangxinyu 1 year ago
parent 74c0c0c944
commit 9ef817ce97

@ -1,7 +1,7 @@
.section .text.entry
.globl _start // _start
_start:
la sp, boot_stack_top
la sp, boot_stack_top_bound
call rust_main
@ -9,7 +9,7 @@ _start:
// .bss.stack link .bss
.section .bss.stack
.globl boot_stack_lower_bound //
.globl boot_stack_top //
.globl boot_stack_top_bound //
boot_stack_lower_bound:
.space 4096 * 16
boot_stack_top:
boot_stack_top_bound:

@ -17,14 +17,17 @@ extern "C" {
fn etext();
fn sbss();
fn ebss();
fn boot_stack_top_bound();
fn boot_stack_lower_bound();
}
#[no_mangle]
pub fn rust_main(){
init_bss();
println!("stext: {:#x}, etext: {:#x}", stext as usize, etext as usize);
println!("sbss: {:#x}, ebss: {:#x}", sbss as usize, ebss as usize);
println!("boot_stack_top_bound: {:#x}, boot_stack_lower_bound: {:#x}", boot_stack_top_bound as usize, boot_stack_lower_bound as usize);
panic!("my panic");
}

Loading…
Cancel
Save