1.4 KiB
1.4 KiB
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.