zephyr/cmake/linker/ld
Nicolas Pitre 678b76e4b0 kernel/init.c: allow for memset/memcpy alternatives during early boot
Zeroing the BSS and copying data to RAM with regular memset/memcpy may
cause problems when those functions are assuming a fully initialized
system for their optimizations to work e.g. some instructions require
an active MMU, but turning the MMU on needs the .bss section to be
cleared first, etc.

Commit c5b898743a ("aarch64: Fix alignment fault on z_bss_zero()")
provides a detailed explanation of such a case.

Replacing z_bss_zero() with an architecture specific one is problematic
as the former may see new sections added to it that would be missed by
the later. The same reasoning goes for z_data_copy().

Let's make maintenance much easier by providing weak versions of
memset/memcpy that can be overridden by architecture-specific safe
versions when needed.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-02-21 21:00:12 -05:00
..
clang toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
gcc toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
host-gcc toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
ld_script.cmake cmake: linker generator replace % with @ for symbol referencing 2022-01-07 18:20:30 +01:00
linker_flags.cmake toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
target.cmake cmake: linker: Use depfile for Makefile generators 2022-01-10 09:49:11 -06:00
target_baremetal.cmake build: Fix native_posix build on GNU GCC 2021-10-05 05:44:32 -04:00
target_base.cmake build: Fix native_posix build on GNU GCC 2021-10-05 05:44:32 -04:00
target_configure.cmake kernel: app_smem: allowing pinning memory partitions 2021-08-26 21:16:22 -04:00
target_cpp.cmake cmake: Use zephyr_link_libraries in toolchain_ld_cpp. 2019-11-07 16:37:50 +01:00
target_relocation.cmake kernel/init.c: allow for memset/memcpy alternatives during early boot 2022-02-21 21:00:12 -05:00