Gcov: Added linker changes needed by Gcov.
This patch adds all the required hooks needed in the linker script. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
cb536111a9
commit
b57a149828
|
@ -156,6 +156,7 @@ config PRIVILEGED_STACK_SIZE
|
||||||
config PRIVILEGED_STACK_TEXT_AREA
|
config PRIVILEGED_STACK_TEXT_AREA
|
||||||
int "Privileged stacks text area"
|
int "Privileged stacks text area"
|
||||||
default 256 if (DEBUG || STACK_CANARIES || CODE_DATA_RELOCATION)
|
default 256 if (DEBUG || STACK_CANARIES || CODE_DATA_RELOCATION)
|
||||||
|
default 512 if COVERAGE_GCOV
|
||||||
default 128
|
default 128
|
||||||
depends on ARCH_HAS_USERSPACE
|
depends on ARCH_HAS_USERSPACE
|
||||||
help
|
help
|
||||||
|
|
|
@ -42,17 +42,6 @@
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_COVERAGE_GCOV
|
|
||||||
/* Section needed by gcov when coverage is turned on.*/
|
|
||||||
SECTION_PROLOGUE (gcov, (OPTIONAL),)
|
|
||||||
{
|
|
||||||
PROVIDE_HIDDEN (__init_array_start = .);
|
|
||||||
KEEP (*(SORT(.init_array.*)))
|
|
||||||
KEEP (*(.init_array*))
|
|
||||||
PROVIDE_HIDDEN (__init_array_end = .);
|
|
||||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
||||||
#endif /* CONFIG_COVERAGE_GCOV */
|
|
||||||
|
|
||||||
SECTION_PROLOGUE (devconfig, (OPTIONAL),)
|
SECTION_PROLOGUE (devconfig, (OPTIONAL),)
|
||||||
{
|
{
|
||||||
__devconfig_start = .;
|
__devconfig_start = .;
|
||||||
|
@ -105,3 +94,14 @@
|
||||||
KEEP(*(SORT_BY_NAME(".font_entry.*")))
|
KEEP(*(SORT_BY_NAME(".font_entry.*")))
|
||||||
__font_entry_end = .;
|
__font_entry_end = .;
|
||||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||||
|
|
||||||
|
#ifdef CONFIG_COVERAGE_GCOV
|
||||||
|
/* Section needed by gcov when coverage is turned on.*/
|
||||||
|
SECTION_PROLOGUE (gcov, (OPTIONAL),)
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array*))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||||
|
#endif /* CONFIG_COVERAGE_GCOV */
|
||||||
|
|
|
@ -236,6 +236,12 @@ extern char _image_rodata_end[];
|
||||||
extern char _vector_start[];
|
extern char _vector_start[];
|
||||||
extern char _vector_end[];
|
extern char _vector_end[];
|
||||||
|
|
||||||
|
#ifdef CONFIG_COVERAGE_GCOV
|
||||||
|
extern char __gcov_bss_start[];
|
||||||
|
extern char __gcov_bss_end[];
|
||||||
|
extern char __gcov_bss_size[];
|
||||||
|
#endif /* CONFIG_COVERAGE_GCOV */
|
||||||
|
|
||||||
/* end address of image, used by newlib for the heap */
|
/* end address of image, used by newlib for the heap */
|
||||||
extern char _end[];
|
extern char _end[];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue