[USER] Load and run ELF module in userspace

This commit is contained in:
2016-11-29 09:16:04 +01:00
parent aa50bbcd0f
commit 63b3c3f2c0
11 changed files with 163 additions and 21 deletions

7
kernel/include/elf.h Normal file
View File

@@ -0,0 +1,7 @@
#pragma once
#include <stdint.h>
#include <process.h>
#include <thread.h>
void *load_elf(process_t *p, void *data);
thread_t *exec_elf(process_t *p, void *image);

View File

@@ -51,6 +51,12 @@ typedef struct {
uint32_t len_hi;
uint32_t type;
} mboot1_mmap_entry;
typedef struct {
uint32_t mod_start;
uint32_t mod_end;
uint32_t str_ptr;
uint32_t reserved;
} mboot1_module_entry;
// MULTIBOOT 2
@@ -95,6 +101,8 @@ typedef struct {
void *mmap;
uint32_t mmap_size;
void *rsdp;
void *init;
uint64_t init_len;
};
extern struct mboot_data_st mboot_data;