lkml.org 
[lkml]   [2019]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] MIPS: disable kcov instrumentation in compressed dir
Date
This patch fixes the compilation with CONFIG_KCOV enabled.
Otherwise linking fails with:
ld: arch/mips/boot/compressed/piggy.o: in function `main':
dummy.c:(.text.startup+0x8): undefined reference to `__sanitizer_cov_...'
make[1]: *** [arch/mips/boot/compressed/Makefile:101: vmlinuz] Error 1

Signed-off-by: Denis Efremov <efremov@linux.com>
---
arch/mips/boot/compressed/Makefile | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 172801ed35b8..d859f079b771 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -29,6 +29,9 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)

+# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
+KCOV_INSTRUMENT := n
+
# decompressor objects (linked with vmlinuz)
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o

--
2.20.1
\
 
 \ /
  Last update: 2019-12-10 18:50    [W:0.043 / U:1.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site