Fix init ressource mapping
This commit is contained in:
parent
a78aa420fd
commit
cb5e408525
10
core/elf.c
10
core/elf.c
@ -138,17 +138,17 @@ uaddr_t loadElfProg(const char *prog, struct process *proc)
|
||||
unrefPhyPage(ppage);
|
||||
}
|
||||
|
||||
// Hack: Even if already allocated mark the adresse space as managed by a ressource
|
||||
// So this address space is not used by another ressource.
|
||||
uaddr = elf_phdrs[i].p_vaddr;
|
||||
zeroMmap(as, &uaddr, elf_phdrs[i].p_memsz, PAGING_MEM_USER | PAGING_MEM_WRITE | PAGING_MEM_READ, 0);
|
||||
|
||||
/* Copy segment into memory */
|
||||
memcpy((void *)elf_phdrs[i].p_vaddr, (void *)(prog + elf_phdrs[i].p_offset),
|
||||
elf_phdrs[i].p_filesz);
|
||||
if (lastUserAddr < uaddr) {
|
||||
lastUserAddr = uaddr;
|
||||
}
|
||||
|
||||
// Hack: Even if already allocated mark the adresse space as managed by a ressource
|
||||
// So this address space is not used by another ressource.
|
||||
uaddr = elf_phdrs[i].p_vaddr;
|
||||
zeroMmap(as, &uaddr, elf_phdrs[i].p_memsz, PAGING_MEM_USER | PAGING_MEM_WRITE | PAGING_MEM_READ, 0);
|
||||
}
|
||||
|
||||
processInitHeap(proc, lastUserAddr);
|
||||
|
Loading…
Reference in New Issue
Block a user