SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
elf_loader.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vaddr_range
 The structure vaddr_range_t represents the mapping between a virtual address range and the starting physical address. More...
 
struct  vaddr_map
 The structure vaddr_map_t represents the mapping between a virtual address range and the starting physical address and size of this table. More...
 

Typedefs

typedef struct vaddr_range vaddr_range_t
 The structure vaddr_range_t represents the mapping between a virtual address range and the starting physical address.
 
typedef struct vaddr_map vaddr_map_t
 The structure vaddr_map_t represents the mapping between a virtual address range and the starting physical address and size of this table.
 

Functions

phys_addr_t elf32_get_entry_addr (phys_addr_t base)
 Extracts the entry address from an ELF32 image loaded at 'base'.
 
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.
 
phys_addr_t elf64_get_entry_addr (phys_addr_t base)
 Extracts the entry address from an ELF64 image loaded at 'base'.
 
int load_elf64_image (phys_addr_t img_addr)
 Loads an ELF64 image into memory starting at 'img_addr'.
 

Typedef Documentation

◆ vaddr_map_t

typedef struct vaddr_map vaddr_map_t

The structure vaddr_map_t represents the mapping between a virtual address range and the starting physical address and size of this table.

◆ vaddr_range_t

typedef struct vaddr_range vaddr_range_t

The structure vaddr_range_t represents the mapping between a virtual address range and the starting physical address.

Function Documentation

◆ elf32_get_entry_addr()

phys_addr_t elf32_get_entry_addr ( phys_addr_t  base)

Extracts the entry address from an ELF32 image loaded at 'base'.

Parameters
baseThe base address of the ELF32 image.
Returns
The entry address of the ELF32 image.

Extracts the entry address from an ELF32 image loaded at 'base'.

Parameters
baseBase address of the ELF32 file
Returns
Entry address

◆ elf64_get_entry_addr()

phys_addr_t elf64_get_entry_addr ( phys_addr_t  base)

Extracts the entry address from an ELF64 image loaded at 'base'.

Parameters
baseThe base address of the ELF64 image.
Returns
The entry address of the ELF64 image.

◆ load_elf32_image()

int load_elf32_image ( phys_addr_t  img_addr)

Loads an ELF32 image into memory starting at 'img_addr'.

Parameters
img_addrThe starting address to load the ELF32 image.
Returns
0 if successful, -1 otherwise.

◆ load_elf32_image_remap()

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.

Parameters
img_addrThe starting address to load the ELF32 image.
mapThe address mapping table.
Returns
0 if successful, -1 otherwise.

◆ load_elf64_image()

int load_elf64_image ( phys_addr_t  img_addr)

Loads an ELF64 image into memory starting at 'img_addr'.

Parameters
img_addrThe starting address to load the ELF64 image.
Returns
0 if successful, -1 otherwise.