mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Print kernel ELF sections
This commit is contained in:
@@ -27,6 +27,15 @@ pub extern fn rust_main(multiboot_information_address: usize) {
|
||||
area.base_addr, area.length);
|
||||
}
|
||||
|
||||
let elf_sections_tag = boot_info.elf_sections_tag()
|
||||
.expect("Elf-sections tag required");
|
||||
|
||||
println!("kernel sections:");
|
||||
for section in elf_sections_tag.sections() {
|
||||
println!(" addr: 0x{:x}, size: 0x{:x}, flags: 0x{:x}",
|
||||
section.addr, section.size, section.flags);
|
||||
}
|
||||
|
||||
loop{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user