zephyr/doc
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
..
_doxygen doc: update doxygen awesome to v2.3.1 2023-12-15 04:33:16 -05:00
_extensions/zephyr doc: extensions: zephyr-domain: make Breathe inserts optional 2024-01-11 10:04:44 +01:00
_scripts doc: kconfig: redirect: Add redirects for some old URLs 2023-12-21 10:02:58 +00:00
_static doc: Make search engine configurable 2023-12-15 04:34:48 -05:00
_templates doc: Make search engine configurable 2023-12-15 04:34:48 -05:00
build doc: build: dts: bindings-syntax: compatible typo 2023-11-29 17:39:30 -08:00
connectivity doc: net: Add network configuration guide 2024-01-11 10:26:47 -05:00
contribute doc: contribute: fix heading formatting 2024-01-07 18:41:16 +01:00
develop doc: twister: fix spelling errors 2024-01-15 11:33:06 +00:00
hardware docs boards native_sim: Add mention about the EEPROM simu 2024-01-09 10:04:03 +01:00
images
introduction bluetooth: mesh: Doc fix Bluetooth mesh to Mesh 2023-12-01 10:56:18 +00:00
kernel code_relocation: Add NOKEEP option 2024-01-15 13:20:17 +01:00
project doc: roles: Remove ambiguity for static analysis 2024-01-06 11:57:36 -05:00
releases Bluetooth: L2CAP: stop stealing buffers from SDU pool 2024-01-15 09:58:58 +01:00
safety
security doc: vuln: Add CVEs under embargo 2024-01-05 23:57:30 +01:00
services posix: sched: Add CONFIG_POSIX_PRIORITY_SCHEDULING 2024-01-15 09:57:44 +01:00
templates
404.rst
CMakeLists.txt
LICENSING.rst
Makefile
conf.py doc: extensions: zephyr-domain: make Breathe inserts optional 2024-01-11 10:04:44 +01:00
glossary.rst doc: Fix occurrences of repeated words 2023-11-15 17:34:39 -05:00
index-tex.rst doc: pdf: Add Glossary of Terms to PDF output 2023-11-13 12:17:51 -05:00
index.rst
kconfig.rst
known-warnings.txt
requirements.txt doc: test: improve pytest documentation 2023-12-14 10:12:21 +01:00
substitutions.txt
zephyr.doxyfile.in doc: force include interface header files first 2024-01-11 21:06:03 -05:00