diff --git a/src/memory/paging/mod.rs b/src/memory/paging/mod.rs index 55ab8e27..b0a15bd7 100644 --- a/src/memory/paging/mod.rs +++ b/src/memory/paging/mod.rs @@ -160,9 +160,7 @@ pub fn remap_the_kernel(allocator: &mut A, boot_info: &BootInformation) // identity map the allocated kernel sections for section in elf_sections_tag.sections() { - use multiboot2::ELF_SECTION_ALLOCATED; - - if !section.flags().contains(ELF_SECTION_ALLOCATED) { + if !section.is_allocated() { // section is not loaded to memory continue; }