summaryrefslogtreecommitdiff
path: root/src/kernel/linker/elf.c
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-03-30 19:22:23 +0200
committerAlexis211 <alexis211@gmail.com>2010-03-30 19:22:23 +0200
commitad1ec29070e1ffba7461687cd268e64be06aa78b (patch)
tree309ca65d46f1a6164c048d9ba2060275d6d63538 /src/kernel/linker/elf.c
parent50152369119ffc92d7790ddcfd26f32613366ede (diff)
downloadTCE-ad1ec29070e1ffba7461687cd268e64be06aa78b.tar.gz
TCE-ad1ec29070e1ffba7461687cd268e64be06aa78b.zip
More work on IPC and userland tools.
Diffstat (limited to 'src/kernel/linker/elf.c')
-rw-r--r--src/kernel/linker/elf.c6
1 files changed, 6 insertions, 0 deletions
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;
}