tests: fix some issues when enabling coverage for qemu_x86_64
Fix some issues in linker.ld when enabling coverage report feature for qemu_x86_64 platform: 1. Fix the gcov record data should not be in BSS section. 2. Fix some test case crash due to lack of memory page align before gcov rodata. Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
This commit is contained in:
parent
8d5a22c3c1
commit
56f84b60ed
1 changed files with 5 additions and 1 deletions
|
@ -107,6 +107,7 @@ SECTIONS
|
|||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
|
||||
MMU_PAGE_ALIGN
|
||||
#include <snippets-rodata.ld>
|
||||
|
||||
#ifdef CONFIG_X86_MMU
|
||||
|
@ -140,6 +141,10 @@ SECTIONS
|
|||
_app_smem_num_words = _app_smem_size >> 2;
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
/* This should be put here before BSS section, otherwise the .bss.__gcov will
|
||||
* be put in BSS section. That causes gcov not work properly */
|
||||
#include <snippets-ram-sections.ld>
|
||||
|
||||
SECTION_PROLOGUE(_BSS_SECTION_NAME, (NOLOAD), ALIGN(16))
|
||||
{
|
||||
MMU_PAGE_ALIGN
|
||||
|
@ -168,7 +173,6 @@ SECTIONS
|
|||
#include <snippets-rwdata.ld>
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
#include <snippets-ram-sections.ld>
|
||||
#include <linker/common-ram.ld>
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
#include <arch/x86/pagetables.ld>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue