mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Update blog to c145f9f1d1
This commit is contained in:
@@ -552,10 +552,9 @@ Let's resolve the above `TODO` by identity mapping the sections:
|
|||||||
|
|
||||||
```rust
|
```rust
|
||||||
for section in elf_sections_tag.sections() {
|
for section in elf_sections_tag.sections() {
|
||||||
use multiboot2::ELF_SECTION_ALLOCATED;
|
|
||||||
use self::entry::WRITABLE;
|
use self::entry::WRITABLE;
|
||||||
|
|
||||||
if !section.flags().contains(ELF_SECTION_ALLOCATED) {
|
if !section.is_allocated() {
|
||||||
// section is not loaded to memory
|
// section is not loaded to memory
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -895,7 +894,7 @@ pub fn remap_the_kernel<A>(allocator: &mut A, boot_info: &BootInformation)
|
|||||||
...
|
...
|
||||||
for section in elf_sections_tag.sections() {
|
for section in elf_sections_tag.sections() {
|
||||||
...
|
...
|
||||||
if !section.flags().contains(ELF_SECTION_ALLOCATED) {
|
if !section.is_allocated() {
|
||||||
// section is not loaded to memory
|
// section is not loaded to memory
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user