Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
llext.h File Reference
#include <zephyr/sys/slist.h>
#include <zephyr/llext/elf.h>
#include <zephyr/llext/symbol.h>
#include <zephyr/kernel.h>
#include <sys/types.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  llext
 Linkable loadable extension. More...
 
struct  llext_load_param
 llext loader parameters More...
 

Macros

#define LLEXT_MEM_PARTITIONS   (LLEXT_MEM_BSS+1)
 
#define LLEXT_LOAD_PARAM_DEFAULT   {.relocate_local = true,}
 

Enumerations

enum  llext_mem {
  LLEXT_MEM_TEXT , LLEXT_MEM_DATA , LLEXT_MEM_RODATA , LLEXT_MEM_BSS ,
  LLEXT_MEM_EXPORT , LLEXT_MEM_SYMTAB , LLEXT_MEM_STRTAB , LLEXT_MEM_SHSTRTAB ,
  LLEXT_MEM_COUNT
}
 List of ELF regions that are stored or referenced in the llext. More...
 

Functions

struct llextllext_by_name (const char *name)
 Find an llext by name.
 
int llext_iterate (int(*fn)(struct llext *ext, void *arg), void *arg)
 Iterate overall registered llext instances.
 
int llext_load (struct llext_loader *loader, const char *name, struct llext **ext, struct llext_load_param *ldr_parm)
 Load and link an extension.
 
int llext_unload (struct llext **ext)
 Unload an extension.
 
const void * llext_find_sym (const struct llext_symtable *sym_table, const char *sym_name)
 Find the address for an arbitrary symbol name.
 
int llext_call_fn (struct llext *ext, const char *sym_name)
 Call a function by name.
 
int llext_add_domain (struct llext *ext, struct k_mem_domain *domain)
 Add the known memory partitions of the extension to a memory domain.
 
int arch_elf_relocate (elf_rela_t *rel, uintptr_t loc, uintptr_t sym_base_addr, const char *sym_name, uintptr_t load_bias)
 Architecture specific function for updating op codes given a relocation.
 
ssize_t llext_find_section (struct llext_loader *loader, const char *search_name)
 Find an ELF section.
 
void arch_elf_relocate_local (struct llext_loader *loader, struct llext *ext, const elf_rela_t *rel, const elf_sym_t *sym, size_t got_offset)
 Architecture specific function for updating addresses via relocation table.