Commit Graph

5 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 908d69ceac llext: remove hard-coded section names
It was clear that hard-coded section names aren't reliable enough but
they broke down way earlier than has been expected.

This patch replaces hard-coded sections with a loop, scanning all
sections and selecting them based on their flags and types.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-06-04 12:53:49 +03:00
Marc Herbert afc769f3c9 llext_link_helper.py: use a raw string for '\.so$' regex
Always use a "raw string" for regular expressions, otherwise the
backslash is used to start Unicode escape sequences.

Fixes hopefully harmless error:
```
scripts/llext_link_helper.py:38: SyntaxWarning: invalid escape sequence '\.'
  p = re.compile('(^lib|\.so$)')
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-05-09 11:16:51 +03:00
Guennadi Liakhovetski 7cb5ef0ad2 llext: catch only the expected exception
When an ELF section isn't found .get_section_by_name() raises an
AttributeError exception, catch it specitically instead of catching
any exception.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-07 10:51:34 +03:00
Guennadi Liakhovetski ed33af4d33 llext: add support for building relocatable modules
Add support for relocatable objects to the llext module build system.
In such builds no ELF segments are created, so we need to process all
sections individually.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Guennadi Liakhovetski 980b1c64f2 smart-amp-test: make a loadable module
Convert the smart-amp-test in its IPC4 version to a loadable LLEXT
module. Use an overlay configuration to select between monolithic and
modular builds.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-03-08 16:25:28 +02:00