Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Linkable loadable extension loader context. More...

#include <loader.h>

Data Fields

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.
 

Detailed Description

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.

Field Documentation

◆ peek

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.

Parameters
[in]ldrLoader
[in]posPosition to obtain a pointer to
Returns
a pointer into the buffer or NULL if not supported

◆ read

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.

Parameters
[in]ldrLoader
[in]outOutput location
[in]lenLength to copy into the output location
Returns
0 on success, or a negative error code.

◆ seek

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.

Parameters
[in]ldrLoader
[in]posPosition in stream to move loader
Returns
0 on success, or a negative error code.

The documentation for this struct was generated from the following file: