linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Prevent link failure with kcov instrumentation
@ 2019-12-09 12:37 jouni.hogander
  2019-12-09 18:48 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: jouni.hogander @ 2019-12-09 12:37 UTC (permalink / raw)
  To: linux-mips; +Cc: Jouni Hogander, Paul Burton, Lukas Bulwahn

From: Jouni Hogander <jouni.hogander@unikie.com>

__sanitizer_cov_trace_pc() is not linked in and causing link
failure if KCOV_INSTRUMENT is enabled. Fix this by disabling
instrumentation for compressed image.

Cc: Paul Burton <paulburton@kernel.org>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>

Signed-off-by: Jouni Hogander <jouni.hogander@unikie.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.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Prevent link failure with kcov instrumentation
  2019-12-09 12:37 [PATCH] MIPS: Prevent link failure with kcov instrumentation jouni.hogander
@ 2019-12-09 18:48 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-12-09 18:48 UTC (permalink / raw)
  To: jouni.hogander
  Cc: linux-mips, Jouni Hogander, Paul Burton, Lukas Bulwahn, linux-mips

Hello,

jouni.hogander@unikie.com wrote:
> From: Jouni Hogander <jouni.hogander@unikie.com>
> 
> __sanitizer_cov_trace_pc() is not linked in and causing link
> failure if KCOV_INSTRUMENT is enabled. Fix this by disabling
> instrumentation for compressed image.
> 
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>

Applied to mips-fixes.

> commit 3f0a2abff9aa
> https://git.kernel.org/mips/c/3f0a2abff9aa
> 
> Signed-off-by: Jouni Hogander <jouni.hogander@unikie.com>
> Signed-off-by: Paul Burton <paulburton@kernel.org>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paulburton@kernel.org to report it. ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 12:37 [PATCH] MIPS: Prevent link failure with kcov instrumentation jouni.hogander
2019-12-09 18:48 ` Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).