xen/linker: be more selective about defining LLVM_COV_*
PATCH 1/1 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 186c02e85961 ('xen: Support LLVM raw profile versions 5, 6, 7, 8, 9, and 10')
Reported-by Andrew Cooper <[email protected]>
Signed-off-by Roger Pau Monné <[email protected]>
--- xen/include/xen/xen.lds.h | 6 ++++++ 1 file changed, 6 insertions(+)
xen/include/xen/xen.lds.h +6 -0
@@ -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.
Signature · 1 line
2.51.0
Quoted 8 lines · Roger Pau Monne
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 186c02e85961 ('xen: Support LLVM raw profile versions 5, 6, 7, 8, 9, and 10')Reported-by Andrew Cooper <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>
Reviewed-by Jan Beulich <[email protected]>