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 doc: remove unused images 2021-07-19 20:06:00 -04:00
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 docs: safety: Add safety documentation 2023-06-22 06:01:39 -04:00
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 doc: Update sample.tmpl with new directive 2023-09-06 12:11:28 +02:00
404.rst doc: Suggest filing GitHub issue for broken links 2022-04-28 10:26:03 +02:00
CMakeLists.txt doc: enable Sphinx tracebacks 2023-07-12 09:13:49 -04:00
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 docs: safety: Add safety documentation 2023-06-22 06:01:39 -04:00
kconfig.rst doc: use new kconfig extension 2022-03-02 09:28:37 +01:00
known-warnings.txt doc: Revert "doc: Add more known-warnings" 2023-09-15 15:05:23 +02:00
LICENSING.rst doc licensing: Remove get_maintainers.pl 2023-06-25 02:46:42 -04:00
Makefile doc: align pseudo-Makefile with latest CMake changes 2023-07-13 14:27:56 +02:00
requirements.txt doc: test: improve pytest documentation 2023-12-14 10:12:21 +01:00
substitutions.txt doc: New developer getting started guide 2019-11-13 14:05:47 -06:00
zephyr.doxyfile.in doc: force include interface header files first 2024-01-11 21:06:03 -05:00