![]() |
SyterKit 0.4.0.x
SyterKit is a bare-metal framework
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <string.h>#include <types.h>#include <elf.h>#include <elf_helpers.h>#include <elf_loader.h>#include <log.h>
Functions | |
| void | print_elf32_ehdr (Elf32_Ehdr *header) |
| phys_addr_t | elf32_get_entry_addr (phys_addr_t base) |
| Get the entry address from the ELF32 file header. | |
| static phys_addr_t | set_img_va_to_pa (phys_addr_t vaddr, vaddr_range_t *map, uint32_t size) |
| Map virtual address to physical address. | |
| int | load_elf32_image (phys_addr_t img_addr) |
| Loads an ELF32 image into memory starting at 'img_addr'. | |
| int | load_elf32_image_remap (phys_addr_t img_addr, vaddr_map_t *map) |
| Loads an ELF32 image into memory starting at 'img_addr', with remap va to pa. | |
| static Elf32_Shdr * | elf32_find_segment (phys_addr_t elf_addr, const char *seg_name) |
| void * | elf32_find_segment_offset (phys_addr_t elf_addr, const char *seg_name) |
| void * | elf32_find_segment_addr (phys_addr_t elf_addr, const char *seg_name) |
Variables | |
| static vaddr_map_t | default_addr_mapping |
|
static |
| void * elf32_find_segment_addr | ( | phys_addr_t | elf_addr, |
| const char * | seg_name | ||
| ) |
| void * elf32_find_segment_offset | ( | phys_addr_t | elf_addr, |
| const char * | seg_name | ||
| ) |
| phys_addr_t elf32_get_entry_addr | ( | phys_addr_t | base | ) |
Get the entry address from the ELF32 file header.
Extracts the entry address from an ELF32 image loaded at 'base'.
| base | Base address of the ELF32 file |
| int load_elf32_image | ( | phys_addr_t | img_addr | ) |
Loads an ELF32 image into memory starting at 'img_addr'.
| img_addr | The starting address to load the ELF32 image. |
| int load_elf32_image_remap | ( | phys_addr_t | img_addr, |
| vaddr_map_t * | map | ||
| ) |
Loads an ELF32 image into memory starting at 'img_addr', with remap va to pa.
| img_addr | The starting address to load the ELF32 image. |
| map | The address mapping table. |
| void print_elf32_ehdr | ( | Elf32_Ehdr * | header | ) |
|
static |
Map virtual address to physical address.
| vaddr | Virtual address to be mapped |
| map | Mapping table containing virtual address range and corresponding physical address range |
| size | Size of the mapping table |
|
static |