Skip to content
Permalink
Browse files

testsuite: coverage: port GCOV linker code to CMake for X86

port GCOV linker code to CMake for X86 platfrom, from linker.ld
to coverage_ram.ld.

Fixes: #16501.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
  • Loading branch information...
wentongwu authored and nashif committed May 30, 2019
1 parent 083617e commit 82d703debc810e29cade858e42b65c67be52982f
Showing with 18 additions and 16 deletions.
  1. +0 −15 include/arch/x86/linker.ld
  2. +18 −1 subsys/testsuite/coverage/coverage_ram.ld
@@ -196,21 +196,6 @@ SECTIONS
/* RAMABLE_REGION */
GROUP_START(RAMABLE_REGION)

#ifdef CONFIG_COVERAGE_GCOV
SECTION_PROLOGUE(_GCOV_BSS_SECTION_NAME, (NOLOAD),)
{
MMU_PAGE_ALIGN
__gcov_bss_start = .;
*(".bss.__gcov0.*");
. = ALIGN(4);
MMU_PAGE_ALIGN
__gcov_bss_end = .;
}GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)

__gcov_bss_num_words = ((__gcov_bss_end - __gcov_bss_start) >> 2);
__gcov_bss_size = __gcov_bss_end - __gcov_bss_start;
#endif /* CONFIG_COVERAGE_GCOV */

/* Located in generated directory. This file is populated by the
* zephyr_linker_sources() Cmake function.
*/
@@ -6,6 +6,7 @@

/* Copied from linker.ld */

#ifdef CONFIG_ARM
SECTION_DATA_PROLOGUE(_GCOV_BSS_SECTION_NAME,(NOLOAD),)
{
#ifdef CONFIG_USERSPACE
@@ -27,4 +28,20 @@ SECTION_DATA_PROLOGUE(_GCOV_BSS_SECTION_NAME,(NOLOAD),)
} GROUP_LINK_IN(RAMABLE_REGION)

__gcov_bss_num_words = ((__gcov_bss_end - __gcov_bss_start) >> 2);
__gcov_bss_size = __gcov_bss_end - __gcov_bss_start;
__gcov_bss_size = __gcov_bss_end - __gcov_bss_start;
#endif

#ifdef CONFIG_X86
SECTION_PROLOGUE(_GCOV_BSS_SECTION_NAME, (NOLOAD),)
{
MMU_PAGE_ALIGN
__gcov_bss_start = .;
*(".bss.__gcov0.*");
. = ALIGN(4);
MMU_PAGE_ALIGN
__gcov_bss_end = .;
}GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)

__gcov_bss_num_words = ((__gcov_bss_end - __gcov_bss_start) >> 2);
__gcov_bss_size = __gcov_bss_end - __gcov_bss_start;
#endif

0 comments on commit 82d703d

Please sign in to comment.
You can’t perform that action at this time.