Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Linkable loadable extension loader context. More...
#include <loader.h>
Data Fields | |
int(* | prepare )(struct llext_loader *ldr) |
Optional function to prepare the loader for loading extension. | |
int(* | read )(struct llext_loader *ldr, void *out, size_t len) |
Function to read (copy) from the loader. | |
int(* | seek )(struct llext_loader *ldr, size_t pos) |
Function to seek to a new absolute location in the stream. | |
void *(* | peek )(struct llext_loader *ldr, size_t pos) |
Optional function to peek at an absolute location in the ELF. | |
void(* | finalize )(struct llext_loader *ldr) |
Optional function to clean after the extension has been loaded or error occurred. | |
Linkable loadable extension loader context.
This object is used to access the ELF file data and cache its contents while an extension is being loaded by the LLEXT subsystem. Once the extension is loaded, this object is no longer needed.
void(* llext_loader::finalize) (struct llext_loader *ldr) |
Optional function to clean after the extension has been loaded or error occurred.
[in] | ldr | Loader |
void *(* llext_loader::peek) (struct llext_loader *ldr, size_t pos) |
Optional function to peek at an absolute location in the ELF.
Return a pointer to the buffer at specified offset.
[in] | ldr | Loader |
[in] | pos | Position to obtain a pointer to |
NULL
if not supported int(* llext_loader::prepare) (struct llext_loader *ldr) |
Optional function to prepare the loader for loading extension.
[in] | ldr | Loader |
int(* llext_loader::read) (struct llext_loader *ldr, void *out, size_t len) |
Function to read (copy) from the loader.
Copies len bytes into buf from the current position of the loader.
[in] | ldr | Loader |
[in] | out | Output location |
[in] | len | Length to copy into the output location |
int(* llext_loader::seek) (struct llext_loader *ldr, size_t pos) |
Function to seek to a new absolute location in the stream.
Changes the location of the loader position to a new absolute given position.
[in] | ldr | Loader |
[in] | pos | Position in stream to move loader |