-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llext: add inspection API test suite
This patch adds a test suite for the inspection API. The test checks that the symbols exported by the 'inspect_ext' extension are correctly mapped inside their corresponding regions and sections. Signed-off-by: Luca Burelli <[email protected]>
- Loading branch information
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2025 Arduino SA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* This extension exports a number of symbols to be used by the LLEXT | ||
* inspection APIs. Each symbol is exported within a different section | ||
* and only the addresses are checked in this test. | ||
*/ | ||
|
||
#include <zephyr/llext/symbol.h> | ||
|
||
int number_in_bss; | ||
int number_in_data = 1; | ||
const int number_in_rodata = 2; | ||
const int number_in_my_rodata Z_GENERIC_SECTION(.my_rodata) = 3; | ||
|
||
void function_in_text(void) | ||
{ | ||
/* only used for address check */ | ||
} | ||
|
||
EXPORT_SYMBOL(number_in_bss); | ||
EXPORT_SYMBOL(number_in_data); | ||
EXPORT_SYMBOL(number_in_rodata); | ||
EXPORT_SYMBOL(number_in_my_rodata); | ||
EXPORT_SYMBOL(function_in_text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters