Skip to content

Commit eec7256

Browse files
committed
tool: fix bug when finding child elf
Signed-off-by: Krishnan Winter <krishnan-git@wintermail.me>
1 parent d65777d commit eec7256

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tool/microkit/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,7 @@ fn build_system(
785785

786786
let child_pgd: &mut PGD = &mut all_child_page_tables[parent_idx].as_mut().unwrap()
787787
[child_pd.id.unwrap() as usize];
788-
// Find the corresponding elf for this child and add loadable segments
789-
// to page table structures.
790-
let child_elf = &pd_elf_files[parent_idx + child_idx];
788+
let child_elf = &pd_elf_files[child_idx];
791789
for loadable_segment in child_elf.loadable_segments() {
792790
child_pgd.add_page_at_vaddr_range(
793791
loadable_segment.virt_addr,

0 commit comments

Comments
 (0)