1 /*
2 * Copyright (c) 2024 Arduino SA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 /* This very basic extension only contains a global variable "number", which is
8 * expected to be mapped at offset 0 in the .data section. This can be used in
9 * CONFIG_LLEXT_STORAGE_WRITABLE-enabled builds to verify that the variable
10 * address, as calculated by the llext loader, matches the start of the .data
11 * section in the ELF buffer as returned by llext_find_section.
12 *
13 * If only this test fails, the llext_find_section API is likely broken.
14 */
15
16 #include <zephyr/llext/symbol.h>
17
18 int number = 42;
19
test_entry(void)20 void test_entry(void)
21 {
22 /* unused */
23 }
24
25 EXPORT_SYMBOL(number);
26