mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen/linker: be more selective about defining LLVM_COV_*
There's no need to place the LLVM coverage sections in the linker script if
not building with clang, or if code coverage is not enabled.
No functional change intended.
Fixes: 186c02e859 ('xen: Support LLVM raw profile versions 5, 6, 7, 8, 9, and 10')
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
ea87662c77
commit
63107e02c2
1 file changed
+6
@@ -81,6 +81,7 @@
|
||||
.stab.index 0 : { *(.stab.index) } \
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
|
||||
#if defined(CONFIG_CC_IS_CLANG) && defined(CONFIG_COVERAGE)
|
||||
/* Clang coverage sections. */
|
||||
#define LLVM_COV_RW_DATA \
|
||||
DECL_SECTION(__llvm_prf_cnts) { *(__llvm_prf_cnts) } \
|
||||
@@ -93,6 +94,11 @@
|
||||
#define LLVM_COV_DEBUG \
|
||||
DECL_DEBUG(__llvm_covfun, 8) \
|
||||
DECL_DEBUG(__llvm_covmap, 8)
|
||||
#else
|
||||
#define LLVM_COV_RW_DATA
|
||||
#define LLVM_COV_RO_DATA
|
||||
#define LLVM_COV_DEBUG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ELF sections.
|
||||
|
||||