Commit graph

8 commits

Author SHA1 Message Date
Grant Ramsay 0933cdec15 doc: kernel: code-relocation: Remove kernel example and add tips
The Kernel code relocation example does not work, as the kernel
contains early initialization code that executes before code
relocation takes place

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-05-02 09:56:11 +01:00
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
Huifeng Zhang 2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Jamie McCrae d98656f081 doc: kernel: code-relocation: Remove erroneous note
The note about required position for the function is not valid.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-10 10:01:42 +00:00
Anas Nashif 5238544d30 doc: change path to code relocation test
A sample was moved to tests, adapt documentation accordingly.

Fixes #56962

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-19 10:42:37 -04:00
Daniel DeGrasse de8478b7f3 doc: code-relocation: Update usage of zephyr_code_relocate
Update usage of zephyr_code_relocate to new API, and add examples of
relocating a library target, as well as using multiple files in list or
CMake generator expressions.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-17 18:08:37 +01:00
Marti Bolivar 1037348b7b doc: update stale references to boilerplate.cmake
Inclusion of this file is now deprecated in favor of
find_package(Zephyr ...). Update documentation appropriately.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2023-01-11 09:40:14 +01:00
Anas Nashif a084be3ba9 doc: move sections from guides
Move remaining items from guides into the appropriate locations using
the new structure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Renamed from doc/guides/code-relocation.rst (Browse further)