aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/elf.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-09 15:43:44 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-09 15:43:44 +0100
commit436418e575b68fd7e85f7fdaf039e03874ec1cb9 (patch)
treea18413eaa89ce9a9fffb40617b5dddfef9bc5d97 /src/kernel/user/elf.c
parenta9a2ea9125f89347e0aa038a136ebd43e6b251b4 (diff)
downloadkogata-436418e575b68fd7e85f7fdaf039e03874ec1cb9.tar.gz
kogata-436418e575b68fd7e85f7fdaf039e03874ec1cb9.zip
Nullfs now uses pager.
Diffstat (limited to 'src/kernel/user/elf.c')
-rw-r--r--src/kernel/user/elf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/kernel/user/elf.c b/src/kernel/user/elf.c
index a3dada7..ed9d3c4 100644
--- a/src/kernel/user/elf.c
+++ b/src/kernel/user/elf.c
@@ -42,9 +42,7 @@ proc_entry_t elf_load(fs_handle_t *f, process_t* process) {
size_t read_r = file_read(f, phdr.p_offset, phdr.p_filesz, (char*)phdr.p_vaddr);
if (read_r != phdr.p_filesz) goto error;
- if (phdr.p_memsz > phdr.p_filesz) {
- memset((char*)phdr.p_vaddr + phdr.p_filesz, 0, phdr.p_memsz - phdr.p_filesz);
- }
+ // no need to zero out extra portion, paging code does that for us
if (!(phdr.p_flags & PF_W)) {
bool mchmap_ok = mchmap(process, (void*)phdr.p_vaddr,