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 dependencies: add support for linking between LLEXT objects #77473

Merged
merged 7 commits into from
Sep 2, 2024

Commits on Aug 28, 2024

  1. llext: remove an unused variable

    Remove a loop counter, that isn't actually used for anything.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    7deb037 View commit details
    Browse the repository at this point in the history
  2. llext: make EXPORT_SYMBOL() universal

    Currently LLEXT has two ways to export symbols:
    EXPORT_SYMBOL() to exort symbols from the main firmware to extensions
    LL_EXTENSION_SYMBOL() to export symbols from extensions
    but it is possible to write code, that needs to export symbols
    regardless of whether it is built into the main image or an
    extension. And in fact there's no real need in two distinct macros -
    we can use one for both cases and recognise at build time which
    direction exporting is happening. This patch extends EXPORT_SYMBOL()
    to also work from extensions.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    d1d3c67 View commit details
    Browse the repository at this point in the history
  3. llext: use EXPORT_SYMBOL() universally

    Replace LL_EXTENSION_SYMBOL() with EXPORT_SYMBOL() in all tests and
    samples.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    d596509 View commit details
    Browse the repository at this point in the history
  4. llext: look for symbols in other LLEXT objects too

    LLEXT objects can also export symbols for use by other such objects.
    That means, that when linking an LLEXT object we have to look for
    unresolved symbols in previously loaded objects too.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    b8ec7e3 View commit details
    Browse the repository at this point in the history
  5. llext: export a symbol needed for immediate logging

    Using the immediate logging option from LLEXT modules requires
    one more symbol export.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    9a1f217 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. llext: fix flag evaluation for section grouping

    When deciding which sections to group together, only the low 3
    section attribute bits are relevant, ignore the rest.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    b2114ea View commit details
    Browse the repository at this point in the history
  2. llext: add dependencies

    When an LLEXT object uses symbols of another such object, it depends
    on it. Such dependencies have to be tracked to prevent their
    accidental unloading. Ideally we should be able to track arbitrary
    numbers of such dependencies, but this is a bit difficult. In this
    first implementation we use a fixed-size array, currently consisting
    of 8 entries.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    c110441 View commit details
    Browse the repository at this point in the history