2019-12-30 16:31:03 +01:00
|
|
|
#ifndef __KERNEL_LOADER_H__
|
|
|
|
# define __KERNEL_LOADER_H__
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2020-01-01 14:19:18 +01:00
|
|
|
#include <kernel/fs/file.h>
|
|
|
|
#include <kernel/process.h>
|
2020-02-24 00:05:27 +01:00
|
|
|
#include <kernel/util/elf.h>
|
2019-12-30 16:31:03 +01:00
|
|
|
|
|
|
|
// Function
|
2020-03-15 00:56:31 +01:00
|
|
|
extern int loader(struct process *process, const char *path);
|
2020-01-01 14:19:18 +01:00
|
|
|
extern int loader_get_header(FILE *file, Elf32_Ehdr *header);
|
2020-03-15 00:56:31 +01:00
|
|
|
extern int loader_load_image(struct process *process, FILE *file, Elf32_Ehdr *header);
|
2020-03-18 17:48:53 +01:00
|
|
|
extern int loader_reloc_sym(struct process *process, FILE *file, Elf32_Ehdr *header);
|
2019-12-30 16:31:03 +01:00
|
|
|
|
|
|
|
#endif /*__KERNEL_LOADER_H__*/
|