mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Use new section.is_allocated function
This commit is contained in:
@@ -160,9 +160,7 @@ pub fn remap_the_kernel<A>(allocator: &mut A, boot_info: &BootInformation)
|
|||||||
|
|
||||||
// identity map the allocated kernel sections
|
// identity map the allocated kernel sections
|
||||||
for section in elf_sections_tag.sections() {
|
for section in elf_sections_tag.sections() {
|
||||||
use multiboot2::ELF_SECTION_ALLOCATED;
|
if !section.is_allocated() {
|
||||||
|
|
||||||
if !section.flags().contains(ELF_SECTION_ALLOCATED) {
|
|
||||||
// section is not loaded to memory
|
// section is not loaded to memory
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user