diff options
Diffstat (limited to 'src/kernel/fs/elf.c')
-rw-r--r-- | src/kernel/fs/elf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/fs/elf.c b/src/kernel/fs/elf.c index 2dddc0e..46a4876 100644 --- a/src/kernel/fs/elf.c +++ b/src/kernel/fs/elf.c @@ -30,7 +30,7 @@ struct process *elf_load(char *path) if (current_proc) prev_dir = current_proc->cr3; else - prev_dir = current_page_directory; + prev_dir = page_directory; u8 *file = read_file(path); if (!file) { @@ -73,8 +73,7 @@ struct process *elf_load(char *path) ((void *)((u32)file) + program_header->offset), program_header->filesz); warn("3"); - if (program_header->filesz > PAGE_SIZE) - panic("ELF binary section too large"); + assert(program_header->filesz <= PAGE_SIZE); break; } default: |