Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
symbol.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_LLEXT_SYMBOL_H
8#define ZEPHYR_LLEXT_SYMBOL_H
9
11#include <stddef.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
32 const char *const name;
33
35 const void *const addr;
36};
37
47 char *name;
48
50 void *addr;
51};
52
53
61 size_t sym_cnt;
62
65};
66
67
76#define EXPORT_SYMBOL(x) \
77 static const STRUCT_SECTION_ITERABLE(llext_const_symbol, x ## _sym) = { \
78 .name = STRINGIFY(x), .addr = x, \
79 }
80
85#ifdef __cplusplus
86}
87#endif
88
89
90#endif /* ZEPHYR_LLEXT_SYMBOL_H */
Constant symbols are unchangeable named memory addresses.
Definition: symbol.h:30
const char *const name
Name of symbol.
Definition: symbol.h:32
const void *const addr
Address of symbol.
Definition: symbol.h:35
Symbols are named memory addresses.
Definition: symbol.h:45
char * name
Name of symbol.
Definition: symbol.h:47
void * addr
Address of symbol.
Definition: symbol.h:50
A symbol table.
Definition: symbol.h:59
size_t sym_cnt
Number of symbols in the table.
Definition: symbol.h:61
struct llext_symbol * syms
Array of symbols.
Definition: symbol.h:64