https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69624
--- Comment #14 from Dmitry Vyukov <dvyukov at google dot com> --- Wait, I already disabled instrumentation of hweight.c for because of this: +# Kernel does not boot if we instrument this file as it uses custom calling +# convention (see CONFIG_ARCH_HWEIGHT_CFLAGS). +KCOV_INSTRUMENT_hweight.o := n If you apply the latest kcov patch "[PATCH v6] kernel: add kcov code coverage", it should work.