-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
loadable modules: add support for loading modules on Xtensa #62433
Commits on Nov 21, 2023
-
llext: add support for shared objects
Add support for linking PIC shared object, which only require linking, using their PLT and GOT lists and don't need any relocation otherwise. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 9061fd5 - Browse repository at this point
Copy the full SHA 9061fd5View commit details
Commits on Nov 27, 2023
-
llext: xtensa: add support for local symbol relocations
Add support for relocating local symbols, as specified in the .rela.dyn section. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for ef49e2d - Browse repository at this point
Copy the full SHA ef49e2dView commit details -
llext: add a function for finding ELF sections
Applications can use custom ELF sections for their own purposes, add a function for finding them. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 78b1b3c - Browse repository at this point
Copy the full SHA 78b1b3cView commit details
Commits on Nov 28, 2023
-
Export some symbols for loadable modules. Also add an EXPORT_SYSCALL() helper macro for exporting system calls by their official names. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for b45d544 - Browse repository at this point
Copy the full SHA b45d544View commit details -
llext: make local relocations optional
Some applications can decide to link their loadable objects for exactly the same addresses, where they will be loaded. In those cases local relocations aren't needed any more and can in fact break the object if applied while the object is in a temporary storage. Add a parameter to skip such local relocations. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 0376bb0 - Browse repository at this point
Copy the full SHA 0376bb0View commit details -
llext: make buffer access functions accessible externally
llext_seek(), llext_read() and llext_peek() are needed outside of the extension code too, move them to a header. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for babc051 - Browse repository at this point
Copy the full SHA babc051View commit details
Commits on Nov 29, 2023
-
llext: add Xtensa test support
Add support for running a modular "Hello world" example on Xtensa. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 1befc75 - Browse repository at this point
Copy the full SHA 1befc75View commit details -
llext: add support for global functions
Loadable modules can contain global (not "static") functions, even if they aren't exported for use by other modules, e.g. when a module is built from multiple .c files. Such functions are then also included in link tables and have to be re-linked. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 6285e1f - Browse repository at this point
Copy the full SHA 6285e1fView commit details -
Extend the llext_load() / llext_unload() API to let it be called repeatedly for the same extension to increment or decrement its reference counter respectively. We use a mutex to protect the counter and make both llext_load() and llext_unload() return the use-count to let the caller identify when the first loading and the last unloading took place. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 3cfc799 - Browse repository at this point
Copy the full SHA 3cfc799View commit details -
llext: fix a memory leak in an error case
If a function fails it should release all the resources it has managed to acquire. Fix llext_load() to free memory that it has allocated in case of an error. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 58a5381 - Browse repository at this point
Copy the full SHA 58a5381View commit details -
llext: add support for exporting symbols from extensions
Extensions should be able to selectively export their global symbols. Add a LL_EXTENSION_SYMBOL() macro for that. Change the present .sym_tab to be a temporary symbol table of all global symbols in an extensions, used only during linking for internal purposes. Add a new .exp_tab symbol table to store symbols, exported by an extension permanently. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 4db0bad - Browse repository at this point
Copy the full SHA 4db0badView commit details -
llext: clarify section map allocation size
Use an element size explicitly when calculating the array size and use the calculated size for memset(). Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 9e3d184 - Browse repository at this point
Copy the full SHA 9e3d184View commit details -
llext: remove llext list scanning from shell.c
The llext list should be internal to llext.c, remove its scanning from shell.c, export a function for that instead. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 3bb8c9c - Browse repository at this point
Copy the full SHA 3bb8c9cView commit details -
llext_list() is an exported function that returns a pointer to the llext internal extension list. That list should only be accessible directly inside llext, while holding a lock. Remove the function. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 71e36d6 - Browse repository at this point
Copy the full SHA 71e36d6View commit details -
llext: remove redundant initialisation
a new llext object is completely initialised with zeros after allocation, no need to additionally set members of an embedded into it array to NULL. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 03b03a8 - Browse repository at this point
Copy the full SHA 03b03a8View commit details -
llext: protect the global llext list
Use an existing mutex to also protect the global llext list. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for b75a618 - Browse repository at this point
Copy the full SHA b75a618View commit details -
llext: fix read-only extension image
When using the LLEXT buffer loader we now avoid copying extensions from storage to allocated memory by pointing directly into the stored image. We then also perform linking and relocation in that memory, which modifies its contents. However, this is impossible if that storage is read-only. Add a Kconfig flag to distinguish between writable and read-only storage types. Also use that flag to decide, whether the extension image in test_llext_simple.c should be defined as const or not. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Configuration menu - View commit details
-
Copy full SHA for 1c56b9d - Browse repository at this point
Copy the full SHA 1c56b9dView commit details