linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: disable kcov instrumentation in compressed dir
@ 2019-12-10 17:50 Denis Efremov
  2019-12-10 18:59 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Efremov @ 2019-12-10 17:50 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Denis Efremov, Paul Burton, James Hogan, linux-mips, linux-kernel

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


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

* Re: [PATCH] MIPS: disable kcov instrumentation in compressed dir
  2019-12-10 17:50 [PATCH] MIPS: disable kcov instrumentation in compressed dir Denis Efremov
@ 2019-12-10 18:59 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-12-10 18:59 UTC (permalink / raw)
  To: Denis Efremov; +Cc: Ralf Baechle, James Hogan, linux-mips, linux-kernel

Hi Denis,

On Tue, Dec 10, 2019 at 08:50:02PM +0300, Denis Efremov wrote:
> 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(+)

This one's identical to this patch which was merged to mips-fixes
yesterday:

    https://git.kernel.org/mips/c/3f0a2abff9aa

Thanks,
    Paul

> 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
> 

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 17:50 [PATCH] MIPS: disable kcov instrumentation in compressed dir Denis Efremov
2019-12-10 18:59 ` 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).