aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs/elf.c
diff options
context:
space:
mode:
authorMarvin Borner2020-05-31 20:26:40 +0200
committerMarvin Borner2020-05-31 20:26:40 +0200
commiteaadde5453e33af6826bb03488991aab0297d3dd (patch)
treef52d06c0841b664abcab547481dca41f4cfb30ff /src/kernel/fs/elf.c
parent45a5ecc72d8e700614a0751f0e7ec68199885b77 (diff)
OMG
Diffstat (limited to 'src/kernel/fs/elf.c')
-rw-r--r--src/kernel/fs/elf.c5
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: