Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llext: Use relocatable by default for xtensa #85190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teburd
Copy link
Collaborator

@teburd teburd commented Feb 4, 2025

LLEXT supports relocatable ELFs with Xtensa alongside dynamic/shared ELFs. Not all Xtensa toolchains support working with/linking shared ELFs though. Change the default to be relocatable and only test shared with working toolchains.

@teburd teburd requested review from pillo79 and lyakh February 4, 2025 20:28
@teburd teburd requested a review from dcpleung February 4, 2025 20:28
@zephyrbot zephyrbot added the area: llext Linkable Loadable Extensions label Feb 4, 2025
extra_conf_files: ['no_mem_protection.conf']
extra_configs:
- CONFIG_LLEXT_STORAGE_WRITABLE=y
- CONFIG_LLEXT_TYPE_ELF_SHAREDLIB=y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new entry is now replacing the previous meaning of llext.writable on Xtensa, while llext.writable_relocatable now becomes identical to llext.writable there, same for SLID versions. Maybe we shouldn't rely on arch defaults and make explicit tests for each ELF type? E.g. llext.writable_relocatable, llext.writable_sharedlib and llext.writable_object?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm frankly not even sure what the object elf type is here... there's no ET_OBJECT or ET_SHARED... its ET_REL or ET_DYN that we actually support here and realistically I need to correct this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan on fixing the object type options in the future. I don't want to break things right before a release.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I still don't think having llext.writable and llext.writable_relocatable perform the same testing on Xtensa (and potentially on other platforms) is a particularly good option. What should llext.writable now mean? Don't think leaving it just the default is very beneficial here since it can overlap with other tests

LLEXT supports relocatable ELFs with Xtensa alongside dynamic/shared
ELFs. Not all Xtensa toolchains support working with/linking shared ELFs
though. Change the default to be relocatable and only test shared with
working toolchains.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
@teburd teburd force-pushed the llext_xtensa_defaults branch from 010748a to fd5031b Compare February 11, 2025 22:19
@teburd teburd added the bug The issue is a bug, or the PR is fixing a bug label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: llext Linkable Loadable Extensions bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants