Use new section.is_allocated function

This commit is contained in:
Philipp Oppermann
2016-02-13 17:05:00 +01:00
parent 3b7638bb1d
commit 941b1fab1c

View File

@@ -160,9 +160,7 @@ pub fn remap_the_kernel<A>(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;
}