Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Jan 29, 2026

I've checked all the external symbols in currently built LLEXT modules and probe and compared them to all the exported symbols. This commit removes most of needlessly exported symbols, except mathematics functions.

Copilot AI review requested due to automatic review settings January 29, 2026 15:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes unnecessary symbol exports (EXPORT_SYMBOL macros) that are not used by LLEXT modules, cleaning up the API surface to only expose what is actually needed.

Changes:

  • Removed 32 EXPORT_SYMBOL macros across 8 files for functions that are not used by LLEXT modules
  • Removed rtos/symbol.h includes from 3 files that no longer have any symbol exports
  • Cleaned up trailing whitespace where EXPORT_SYMBOL macros were removed

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib/dma.c Removed 4 DMA-related symbol exports and the symbol.h include
src/ipc/ipc4/helper.c Removed 1 audio format conversion symbol export
src/debug/debug_stream/debug_stream_text_msg.c Removed debug message symbol export
src/audio/module_adapter/module_adapter_ipc4.c Removed 7 module adapter IPC4 function exports
src/audio/module_adapter/module_adapter.c Removed 13 module adapter function exports and the symbol.h include
src/audio/module_adapter/module/generic.c Removed 2 generic module function exports
src/audio/drc/drc_log.c Removed 3 DRC logging-related symbol exports and the symbol.h include
src/audio/component.c Removed component registration symbol export

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

build test will confirm none are needed.

@lyakh
Copy link
Collaborator Author

lyakh commented Jan 29, 2026

build test will confirm none are needed.

@lgirdwood nnno, build doesn't check that. Only run-time. And actually even then mostly only if those functions happen to get called. So, say, if function fff() isn't exported, and a module has a call to it, LLEXT will complain when linking. But if that module doesn't happen to call it, nothing bad would happen. But in fact some time ago we made missing symbols errors, so now yes, runtime will fail. But not build.

@lgirdwood
Copy link
Member

build test will confirm none are needed.

@lgirdwood nnno, build doesn't check that. Only run-time. And actually even then mostly only if those functions happen to get called. So, say, if function fff() isn't exported, and a module has a call to it, LLEXT will complain when linking. But if that module doesn't happen to call it, nothing bad would happen. But in fact some time ago we made missing symbols errors, so now yes, runtime will fail. But not build.

ok, but the CI will have full coverage here which is good.

I've checked all the external symbols in currently built LLEXT
modules and probe and compared them to all the exported symbols. This
commit removes most of needlessly exported symbols, except
mathematics functions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh
Copy link
Collaborator Author

lyakh commented Jan 29, 2026

build test will confirm none are needed.

@lgirdwood nnno, build doesn't check that. Only run-time. And actually even then mostly only if those functions happen to get called. So, say, if function fff() isn't exported, and a module has a call to it, LLEXT will complain when linking. But if that module doesn't happen to call it, nothing bad would happen. But in fact some time ago we made missing symbols errors, so now yes, runtime will fail. But not build.

ok, but the CI will have full coverage here which is good.

@lgirdwood actually also not quite, sorry. We don't test all the LLEXT modules. So if I by chance remove an exported symbol that's needed by another module, that we aren't testing in CI, it won't be caught. But the probability is low and even if we do break something, fixing it would be simple because these errors are printed explicitly in the log when a symbol is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants