Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Linkable loadable extension symbol. More...

Data Structures

struct  llext_const_symbol
 Constant symbols are unchangeable named memory addresses. More...
 
struct  llext_symbol
 Symbols are named memory addresses. More...
 
struct  llext_symtable
 A symbol table. More...
 

Macros

#define EXPORT_SYMBOL(x)
 Export a constant symbol to extensions.
 
#define LL_EXTENSION_SYMBOL(x)
 Exports a symbol from an extension to the base image.
 

Detailed Description

Linkable loadable extension symbol.

Macro Definition Documentation

◆ EXPORT_SYMBOL

#define EXPORT_SYMBOL (   x)

#include <zephyr/llext/symbol.h>

Value:
static const STRUCT_SECTION_ITERABLE(llext_const_symbol, x ## _sym) = { \
.name = STRINGIFY(x), .addr = (const void *)&x, \
}
#define STRINGIFY(s)
Definition: common.h:134
#define STRUCT_SECTION_ITERABLE(struct_type, varname)
Defines a new element for an iterable section.
Definition: iterable_sections.h:216
Constant symbols are unchangeable named memory addresses.
Definition: symbol.h:31

Export a constant symbol to extensions.

Takes a symbol (function or object) by symbolic name and adds the name and address of the symbol to a table of symbols that may be referenced by extensions.

Parameters
xSymbol to export to extensions

◆ LL_EXTENSION_SYMBOL

#define LL_EXTENSION_SYMBOL (   x)

#include <zephyr/llext/symbol.h>

Value:
static const struct llext_const_symbol \
Z_GENERIC_SECTION(".exported_sym") __used \
x ## _sym = { \
.name = STRINGIFY(x), .addr = (const void *)&x, \
}

Exports a symbol from an extension to the base image.

This macro can be used in extensions to add a symbol (function or object) to the extension's exported symbol table, so that it may be referenced by the base image.

Parameters
xExtension symbol to export to the base image