Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
Data Structures | |
struct | llext_buf_loader |
Implementation of llext_loader that reads from a memory buffer. More... | |
struct | llext_fs_loader |
Implementation of llext_loader that reads from a filesystem. More... | |
struct | llext_loader |
Linkable loadable extension loader context. More... | |
Macros | |
#define | LLEXT_BUF_LOADER(_buf, _buf_len) |
Initializer for an llext_buf_loader structure. | |
#define | LLEXT_TEMPORARY_BUF_LOADER(_buf, _buf_len) |
#define | LLEXT_PERSISTENT_BUF_LOADER(_buf, _buf_len) |
Initialize an llext_buf_loader structure for a persistent, read-only buffer. | |
#define | LLEXT_WRITABLE_BUF_LOADER(_buf, _buf_len) |
Initialize an llext_buf_loader structure for a persistent, writable buffer. | |
#define | LLEXT_FS_LOADER(_filename) |
Initializer for an llext_fs_loader structure. | |
Enumerations | |
enum | llext_storage_type { LLEXT_STORAGE_TEMPORARY , LLEXT_STORAGE_PERSISTENT , LLEXT_STORAGE_WRITABLE } |
Storage type for the ELF data to be loaded. More... | |
#define LLEXT_BUF_LOADER | ( | _buf, | |
_buf_len ) |
#include <zephyr/llext/buf_loader.h>
Initializer for an llext_buf_loader structure.
The storage type for the provided buffer depends on the value of the CONFIG_LLEXT_STORAGE_WRITABLE
option: if it is defined, the buffer is assumed to be writable; otherwise it is assumed to be persistent.
Consider using one of the alternative macros instead.
_buf | Buffer containing the ELF binary |
_buf_len | Buffer length in bytes |
#define LLEXT_FS_LOADER | ( | _filename | ) |
#include <zephyr/llext/fs_loader.h>
Initializer for an llext_fs_loader structure.
_filename | Absolute path to the extension file. |
#define LLEXT_PERSISTENT_BUF_LOADER | ( | _buf, | |
_buf_len ) |
#include <zephyr/llext/buf_loader.h>
Initialize an llext_buf_loader structure for a persistent, read-only buffer.
ELF data from the specified buffer is guaranteed to be accessible for as long as the extension is loaded. The LLEXT subsystem may directly access the ELF data, as long as no modification is required during loading.
_buf | Buffer containing the ELF binary |
_buf_len | Buffer length in bytes |
#define LLEXT_TEMPORARY_BUF_LOADER | ( | _buf, | |
_buf_len ) |
#include <zephyr/llext/buf_loader.h>
#define LLEXT_WRITABLE_BUF_LOADER | ( | _buf, | |
_buf_len ) |
#include <zephyr/llext/buf_loader.h>
Initialize an llext_buf_loader structure for a persistent, writable buffer.
ELF data from the specified buffer is guaranteed to be accessible for as long as the extension is loaded. The LLEXT subsystem may directly access and modify the ELF data.
_buf | Buffer containing the ELF binary |
_buf_len | Buffer length in bytes |
enum llext_storage_type |
#include <zephyr/llext/loader.h>
Storage type for the ELF data to be loaded.
This enum defines the storage type of the ELF data that will be loaded. The storage type determines which memory optimizations can be tried by the LLEXT subsystem during the load process.
Enumerator | |
---|---|
LLEXT_STORAGE_TEMPORARY | ELF data is only available during llext_load(); even if the loader supports directly accessing the memory via llext_peek(), the buffer contents will be discarded afterwards. LLEXT will allocate copies of all required data into its heap. |
LLEXT_STORAGE_PERSISTENT | ELF data is stored in a read-only buffer that is guaranteed to be always accessible for as long as the extension is loaded. LLEXT may directly reuse constant data from the buffer, but may still allocate copies if relocations need to be applied. |
LLEXT_STORAGE_WRITABLE | ELF data is stored in a writable memory buffer that is guaranteed to be always accessible for as long as the extension is loaded. LLEXT may freely modify and reuse data in the buffer; so, after the extension is unloaded, the contents should be re-initialized before a subsequent llext_load() call. |