17 #include <linux/binfmts.h>
19 #include <linux/mman.h>
20 #include <linux/elf.h>
21 #include <asm/pgtable.h>
22 #include <asm/pgalloc.h>
23 #include <asm/sections.h>
27 static void sim_notify_exec(
const char *binary_name)
39 static int notify_exec(
struct mm_struct *mm)
49 sim_notify_exec(path);
59 static void sim_notify_interp(
unsigned long load_addr)
62 for (i = 0; i <
sizeof(load_addr); i++) {
63 unsigned char c = load_addr >> (i * 8);
72 static void *vdso_page;
75 static struct page *vdso_pages[1];
77 static int __init vdso_setup(
void)
80 memcpy(vdso_page, __rt_sigreturn, __rt_sigreturn_end - __rt_sigreturn);
101 unsigned long vdso_base;
111 if (!notify_exec(mm))
120 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC,
135 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC, 0);
150 memset(regs, 0,
sizeof(*regs));
153 sim_notify_interp(load_addr);