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:
Roger Pau Monne committed 2025-11-26 10:42:20 +01:00
1 parent ea87662c77
commit 63107e02c2
1 file changed
+6
+6
View File
@@ -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.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.