mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 22:18:21 +00:00
kernel: pass AT_PAGESZ on exec
This commit is contained in:
@@ -163,11 +163,13 @@ int elf_load(vnode_t *vnode, void *base, void **entry, char **interpreter, auxv6
|
||||
auxv64->phent.type = AT_PHENT;
|
||||
auxv64->entry.type = AT_ENTRY;
|
||||
auxv64->secure.type = AT_SECURE;
|
||||
auxv64->pagesz.type = AT_PAGESZ;
|
||||
|
||||
auxv64->secure.val = 0; // set later by whoever called elf_load
|
||||
auxv64->phnum.val = header.phcount;
|
||||
auxv64->phent.val = header.phsize;
|
||||
auxv64->entry.val = header.entry + (uintptr_t)base;
|
||||
auxv64->pagesz.val = PAGE_SIZE;
|
||||
*entry = (void *)(header.entry + (uintptr_t)base);
|
||||
|
||||
__assert(header.phsize == sizeof(elfph64_t));
|
||||
|
||||
Reference in New Issue
Block a user