Skip to content

Conversation

@pillo79
Copy link
Contributor

@pillo79 pillo79 commented May 29, 2024

This PR introduces a test for the pre_located feature added in #72479, by crafting a special extension that is not supposed to be executed but contains a symbol whose address is manually placed via a custom link step.
This also replaces the current dummy add_llext_command() step with an actual use case.

@pillo79 pillo79 added the DNM This PR should not be merged (Do Not Merge) label May 29, 2024
@lyakh
Copy link
Contributor

lyakh commented May 30, 2024

@pillo79 thanks, good to have a test for this! Looks like you've forgotten the .c file https://github.com/zephyrproject-rtos/zephyr/actions/runs/9289449787/job/25564543119?pr=73479#step:12:336 BTW, since this isn't actually executing, maybe an existing llext test file could be reused. But I tend to agree, that having a separate .c is cleaner, it should be really small too.

@pillo79
Copy link
Contributor Author

pillo79 commented May 30, 2024

A perfect use case for the "facepalm" emoticon as a reaction... 😅
Indeed it's tiny, it only exports an useless function, but I think it's good for clarity to have a separate test for this.

@pillo79 pillo79 force-pushed the reloc branch 2 times, most recently from dfb75ff to bad3c04 Compare May 30, 2024 12:42
@pillo79
Copy link
Contributor Author

pillo79 commented May 30, 2024

Rebased to fix CI issues with Apollo and included the latest revision of #72479.

This test checks that the pre_located feature works as expected. It
creates a new extension that is manually relocated to a specific address
via the add_llext_command() CMake function invoking a custom linker
command. The test then loads the extension setting the pre_located
option and checks that the symbol is resolved properly.

Signed-off-by: Luca Burelli <[email protected]>
@teburd teburd added this to the v3.7.0 milestone May 30, 2024
@pillo79 pillo79 removed the DNM This PR should not be merged (Do Not Merge) label May 30, 2024
@pillo79 pillo79 changed the title [DNM] llext: add pre_located test [llext: add pre_located test May 30, 2024
@pillo79 pillo79 changed the title [llext: add pre_located test llext: add pre_located test May 30, 2024
@pillo79 pillo79 marked this pull request as ready for review May 30, 2024 14:56
@zephyrbot zephyrbot requested review from lyakh and teburd May 30, 2024 14:57
@nashif nashif merged commit 435b72d into zephyrproject-rtos:main Jun 3, 2024
@pillo79 pillo79 deleted the reloc branch June 4, 2024 14:37
@henrikbrixandersen henrikbrixandersen added the area: llext Linkable Loadable Extensions label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: llext Linkable Loadable Extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants