mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
kernel: change base load addresses of pie elves and mmap
This commit is contained in:
@@ -154,7 +154,7 @@ int elf_load(vnode_t *vnode, void *base, void **entry, char **interpreter, auxv6
|
|||||||
return ENOEXEC;
|
return ENOEXEC;
|
||||||
|
|
||||||
if (!base && header.type == ELF_SHARED) {
|
if (!base && header.type == ELF_SHARED) {
|
||||||
base = (void *)0x400000;
|
base = (void *)0x40000000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
auxv64->null.type = AT_NULL;
|
auxv64->null.type = AT_NULL;
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ syscallret_t syscall_mmap(context_t *context, void *hint, size_t len, int prot,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hint < USERSPACE_START)
|
if (hint < USERSPACE_START)
|
||||||
hint = USERSPACE_START;
|
hint = USERSPACE_MMAP_START;
|
||||||
|
|
||||||
ret.ret = (uint64_t)vmm_map(hint, len, vmmflags, mmuflags, &vfd);
|
ret.ret = (uint64_t)vmm_map(hint, len, vmmflags, mmuflags, &vfd);
|
||||||
if (ret.ret == 0)
|
if (ret.ret == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user