diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-09 15:43:44 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-09 15:43:44 +0100 |
commit | 436418e575b68fd7e85f7fdaf039e03874ec1cb9 (patch) | |
tree | a18413eaa89ce9a9fffb40617b5dddfef9bc5d97 /src/kernel/user/elf.c | |
parent | a9a2ea9125f89347e0aa038a136ebd43e6b251b4 (diff) | |
download | kogata-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.c | 4 |
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, |