This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/content/projects/noxos/docs/codebase/drivers/elf/mapping.h.md

1.4 KiB

title summary
mapping.h handles the memory mappings that an ELF file can request

elf_mapping_T - struct

A mapping describes an area of memory, that should be copied from the elf file into the RAM and how/where it should be mapped.

Name Type Description
offset_file uint64_t The mappings' start in the elf file
offset_virtual uint64_t The mappings' start in memory
length_file uint64_t The mappings' size in the elf file
length_virtual uint64_t The mappings' size in memory, if this is bigger than length_file the remaining space will be filled with zeros

elf_mappings_apply(mappings, num_mappings, buffer, base, page_map) - function (void)

Maps all mappings into page_map and copies the related data from buffer (elf file) to the mapped memory. base specifies where the mappings should start in the virtual address space.