From ad1ec29070e1ffba7461687cd268e64be06aa78b Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Tue, 30 Mar 2010 19:22:23 +0200 Subject: More work on IPC and userland tools. --- src/kernel/linker/elf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/kernel/linker') diff --git a/src/kernel/linker/elf.c b/src/kernel/linker/elf.c index bbf4906..6ad5d34 100644 --- a/src/kernel/linker/elf.c +++ b/src/kernel/linker/elf.c @@ -16,6 +16,8 @@ thread_entry elf_load(uint8_t *data, struct process* process) { int i; if (elf_check(data)) return 0; + struct page_directory *r = current_pagedir; + cli(); pagedir_switch(process->pagedir); phdr = (struct elf_phdr*)((uint8_t*)(data + ehdr->e_phoff)); @@ -28,6 +30,10 @@ thread_entry elf_load(uint8_t *data, struct process* process) { } } } + + pagedir_switch(r); + sti(); + return (thread_entry)ehdr->e_entry; } -- cgit v1.2.3