2023-03-10 10:32:50 +00:00
|
|
|
// This file is part of noxos and licensed under the MIT open source license
|
2023-03-02 16:58:04 +00:00
|
|
|
|
|
|
|
#ifndef NOX_MAPPING_H
|
|
|
|
#define NOX_MAPPING_H
|
|
|
|
|
|
|
|
#include "utils/stdtypes.h"
|
|
|
|
#include "mm/page_map.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint64_t offset_file;
|
|
|
|
uint64_t offset_virtual;
|
|
|
|
uint64_t length_file;
|
|
|
|
uint64_t length_virtual;
|
|
|
|
} elf_mapping_T;
|
|
|
|
|
|
|
|
void elf_mappings_apply(elf_mapping_T* mappings, uint64_t num_mappings, uint8_t* buffer, void* base, page_map_T* page_map);
|
|
|
|
|
|
|
|
#endif //NOX_MAPPING_H
|