Skip to content

Commit aeec014

Browse files
pillo79fabiobaltieri
authored andcommitted
llext: rename symbol struct identifiers
This patch renames the identifiers for the structs in the LLEXT symbol tables to have a prefix of "__llext_sym_". This is done so existing scripts like gen_device_deps.py do not confuse them with the object they are referring to. Signed-off-by: Luca Burelli <[email protected]>
1 parent bf9584d commit aeec014

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/zephyr/llext/symbol.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct llext_symtable {
9393
#define Z_LL_EXTENSION_SYMBOL(x) \
9494
static const struct llext_const_symbol \
9595
Z_GENERIC_SECTION(".exported_sym") __used \
96-
x ## _sym = { \
96+
__llext_sym_ ## x = { \
9797
.name = STRINGIFY(x), .addr = (const void *)&x, \
9898
}
9999
#else
@@ -124,13 +124,15 @@ struct llext_symtable {
124124
#define Z_EXPORT_SYMBOL(x) \
125125
static const char Z_GENERIC_SECTION("llext_exports_strtab") __used \
126126
x ## _sym_name[] = STRINGIFY(x); \
127-
static const STRUCT_SECTION_ITERABLE(llext_const_symbol, x ## _sym) = { \
127+
static const STRUCT_SECTION_ITERABLE(llext_const_symbol, \
128+
__llext_sym_ ## x) = { \
128129
.name = x ## _sym_name, .addr = (const void *)&x, \
129130
}
130131
#elif defined(CONFIG_LLEXT)
131132
/* LLEXT application: export symbols */
132133
#define Z_EXPORT_SYMBOL(x) \
133-
static const STRUCT_SECTION_ITERABLE(llext_const_symbol, x ## _sym) = { \
134+
static const STRUCT_SECTION_ITERABLE(llext_const_symbol, \
135+
__llext_sym_ ## x) = { \
134136
.name = STRINGIFY(x), .addr = (const void *)&x, \
135137
}
136138
#else

0 commit comments

Comments
 (0)