From eaadde5453e33af6826bb03488991aab0297d3dd Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 31 May 2020 20:26:40 +0200 Subject: OMG --- src/kernel/fs/elf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/kernel/fs/elf.c') 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: -- cgit v1.2.3