On ARM64 the build will fail with coverage and GCOV enabled:
CONFIG_COVERAGE=y
CONFIG_COVERAGE_GCOV=y
CONFIG_FORCE_COVERAGE=y
west build -b rpi_5 -p always samples/hello_world -- \
-DCONFIG_COVERAGE=y -DCONFIG_FORCE_COVERAGE=y
Failure:
"linker_zephyr_pre0.cmd:181: undefined symbol `__gcov_bss_end' referenced
in expression"
Fix build of ARM64 platforms with coverage and GCOV enabled by adding for
ARM64 the same gcov linker sections as it is done for ARM.
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
We need to do a few things differently if we are to support
a virtual memory map, i.e. CONFIG_MMU where CONFIG_KERNEL_VM_BASE
is not the same as CONFIG_SRAM_BASE_ADDRESS.
- All sections must be specified with a VMA and LMA, where
VMA is the virtual address and LMA is the physical memory
location.
- All sections must be specified with ALIGN_WITH_INPUT to
keep VMAs and LMAs synchronized
To do this, the existing linker macros need some adjustment:
- GROUP_LINK_IN undefined when CONFIG_KERNEL_VM_BASE is not
the same as CONFIG_SRAM_BASE_ADDRESS.
- New macro GROUP_ROM_LINK_IN for text/rodata sections
- New macro GROUP_NOLOAD_LINK_IN for bss/noinit sections
- Implicit ALIGN_WITH_INPUT for all sections
GROUP_FOLLOWS_AT is unused anywhere in the kernel for years
now and has been removed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
* add toolchain abstraction for coverage
* add select HAS_COVERAGE_SUPPORT to kconfig
* port gcov linker code to CKake for arc
* give user permission to gcov bss section
* expand the size of iccm and dccm to 1M
Signed-off-by: Jingru Wang <jingru@synopsys.com>
* add toolchain abstraction for coverage
* add select HAS_COVERAGE_SUPPORT to kconfig
* port gcov linker code to CKake for arc
Signed-off-by: Jingru Wang <jingru@synopsys.com>