From: Denis Efremov <efremov@linux.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Denis Efremov <efremov@linux.com>,
Paul Burton <paulburton@kernel.org>,
James Hogan <jhogan@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] MIPS: disable kcov instrumentation in compressed dir
Date: Tue, 10 Dec 2019 20:50:02 +0300 [thread overview]
Message-ID: <20191210175002.981-1-efremov@linux.com> (raw)
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
next reply other threads:[~2019-12-10 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 17:50 Denis Efremov [this message]
2019-12-10 18:59 ` [PATCH] MIPS: disable kcov instrumentation in compressed dir Paul Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191210175002.981-1-efremov@linux.com \
--to=efremov@linux.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paulburton@kernel.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox