summaryrefslogtreecommitdiff
path: root/src/kernel/linker
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-17 11:27:59 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-17 11:27:59 +0200
commit1c7c106b06b6a88502801e699ef99e72b7c625cd (patch)
tree5708a229b0d66e8eb82a953861e017915f8176b6 /src/kernel/linker
parent5bc8549a8d7f5c9644f878fe3ca55761663a2fd0 (diff)
downloadTCE-1c7c106b06b6a88502801e699ef99e72b7c625cd.tar.gz
TCE-1c7c106b06b6a88502801e699ef99e72b7c625cd.zip
Fixed some nasty bugs.
Diffstat (limited to 'src/kernel/linker')
-rw-r--r--src/kernel/linker/elf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/linker/elf.cpp b/src/kernel/linker/elf.cpp
index 9477e8a..29689a2 100644
--- a/src/kernel/linker/elf.cpp
+++ b/src/kernel/linker/elf.cpp
@@ -27,7 +27,7 @@ thread_entry elf_load(uint8_t *data, process* process) {
(new simpleseg(phdr[i].p_vaddr, phdr[i].p_memsz, (phdr[i].p_flags & PF_W) != 0))->map(process->pagedir, 0);
memcpy((uint8_t*)phdr[i].p_vaddr, data + phdr[i].p_offset, phdr[i].p_filesz);
if (phdr[i].p_memsz > phdr[i].p_filesz) {
- memset((uint8_t*)phdr[i].p_vaddr + phdr[i].p_memsz, 0, phdr[i].p_memsz - phdr[i].p_filesz);
+ memset((uint8_t*)((size_t)phdr[i].p_vaddr + phdr[i].p_filesz), 0, phdr[i].p_memsz - phdr[i].p_filesz);
}
if (phdr[i].p_vaddr + phdr[i].p_memsz > dataseg) {
dataseg = phdr[i].p_vaddr + phdr[i].p_memsz;