diff options
author | Marvin Borner | 2020-04-01 22:58:54 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-01 22:58:54 +0200 |
commit | ce13b28b90e8f7d8083658e083831c6528847099 (patch) | |
tree | 54882764e8bdad831c6a787b7c1d5d52d1ae4f48 /src/kernel/kernel.c | |
parent | f79ada76d2e4056ff5a81b53998d6d2696523d0f (diff) |
Static address linking approach for userspace
Kinda works but loading an statically linked binary into memory via
kmalloc seems to create a crash which results in a bootloop.
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r-- | src/kernel/kernel.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index e5cb666..e1822d8 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -57,14 +57,12 @@ void kernel_main(uint32_t initial_stack) install_melvix(); #endif - loader_init(); - elf_init(); - exec_start((uint8_t *)userspace); + load_elf((char *)userspace); - // syscalls_install(); - // exec(userspace); + // syscalls_install(); + // exec(userspace); panic("This should NOT happen!"); // asm ("div %0" :: "r"(0)); // Exception testing x/0 -}
\ No newline at end of file +} |