zephyr/doc/kernel
Grzegorz Swiderski 460b6ef122 code_relocation: Add NOKEEP option
When using the code and data relocation feature, every relocated symbol
would be marked with `KEEP()` in the generated linker script. Therefore,
if any input files contained unused code, then it wouldn't be discarded
by the linker, even when invoked with `--gc-sections`.

This can cause unexpected bloat, or other link-time issues stemming from
some symbols being discarded and others not.

On the other hand, this behavior has been present since the feature's
introduction, so it should remain default for the users who rely on it.

This patch introduces support for `zephyr_code_relocate(... NOKEEP)`.
This will suppress the generation of `KEEP()` statements for all symbols
in a particular library or set of files.

Much like `NOCOPY`, the `NOKEEP` flag is passed to `gen_relocate_app.py`
in string form. The script is now equipped to handle multiple such flags
when passed from CMake as a semicolon-separated list, like so:

   "SRAM2:NOCOPY;NOKEEP:/path/to/file1.c;/path/to/file2.c"

Documentation and tests are updated here as well.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-01-15 13:20:17 +01:00
..
data_structures doc: Fix double 'the' 2023-11-15 14:25:11 +00:00
drivers doc: drivers: deprecate driver init levels 2023-11-14 10:20:53 -05:00
iterable_sections doc: move misc services into OS Service section 2022-04-07 16:35:19 +02:00
memory_management kernel: Introduce a way to specify minimum system heap size 2023-12-20 11:01:42 +01:00
object_cores doc: Add missing threads references to object cores 2023-10-09 10:16:46 +02:00
services doc: Fix sentence 2024-01-08 14:06:40 -05:00
timing_functions os: timing: polish doxygen 2023-12-12 19:10:33 +01:00
usermode syscall: rename Z_OOPS -> K_OOPS 2023-11-03 11:46:52 +01:00
util doc: move utility functions to kernel 2022-04-07 16:35:19 +02:00
code-relocation.rst code_relocation: Add NOKEEP option 2024-01-15 13:20:17 +01:00
index.rst doc: Add object core documentation 2023-09-30 08:04:14 +03:00
timeutil.rst bluetooth: mesh: Doc fix Bluetooth mesh to Mesh 2023-12-01 10:56:18 +00:00