Add section about kernel elf sections

This commit is contained in:
Philipp Oppermann
2015-11-13 19:56:27 +01:00
parent 33fdbce530
commit 895d40cd13
3 changed files with 55 additions and 1 deletions

View File

@@ -27,6 +27,14 @@ SECTIONS {
.text :
{
*(.text)
*(.text .text.*)
}
.rodata : {
*(.rodata .rodata.*)
}
.data.rel.ro : {
*(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
}
}

View File

@@ -36,6 +36,12 @@ pub extern fn rust_main(multiboot_information_address: usize) {
println!(" start: 0x{:x}, length: 0x{:x}", area.base_addr, area.length);
}
println!("kernel sections:");
for section in boot_info.elf_sections_tag().unwrap().sections() {
println!(" addr: 0x{:x}, size: 0x{:x}, flags: 0x{:x}",
section.addr, section.size, section.flags);
}
loop{}
}