diff options
author | Marvin Borner | 2020-05-31 20:26:40 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-31 20:26:40 +0200 |
commit | eaadde5453e33af6826bb03488991aab0297d3dd (patch) | |
tree | f52d06c0841b664abcab547481dca41f4cfb30ff /src/kernel/fs/elf.c | |
parent | 45a5ecc72d8e700614a0751f0e7ec68199885b77 (diff) |
OMG
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: |