Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: Disable CONFIG_GCOV with MODULES

CONFIG_GCOV doesn't work with modules, and for various reasons
it cannot work, see also
https://lore.kernel.org/r/d36ea54d8c0a8dd706826ba844a6f27691f45d55.camel@sipsolutions.net

Make CONFIG_GCOV depend on !MODULES to avoid anyone
running into issues there. This also means we need
not export the gcov symbols.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Johannes Berg and committed by
Richard Weinberger
ad3d1991 ea8e896c

+1 -17
+1
arch/um/Kconfig.debug
··· 17 17 bool "Enable gcov support" 18 18 depends on DEBUG_INFO 19 19 depends on !KCOV 20 + depends on !MODULES 20 21 help 21 22 This option allows developers to retrieve coverage data from a UML 22 23 session.
-1
arch/um/kernel/Makefile
··· 21 21 22 22 obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o 23 23 obj-$(CONFIG_GPROF) += gprof_syms.o 24 - obj-$(CONFIG_GCOV) += gmon_syms.o 25 24 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 26 25 obj-$(CONFIG_STACKTRACE) += stacktrace.o 27 26
-16
arch/um/kernel/gmon_syms.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 - */ 5 - 6 - #include <linux/module.h> 7 - 8 - extern void __bb_init_func(void *) __attribute__((weak)); 9 - EXPORT_SYMBOL(__bb_init_func); 10 - 11 - extern void __gcov_init(void *) __attribute__((weak)); 12 - EXPORT_SYMBOL(__gcov_init); 13 - extern void __gcov_merge_add(void *, unsigned int) __attribute__((weak)); 14 - EXPORT_SYMBOL(__gcov_merge_add); 15 - extern void __gcov_exit(void) __attribute__((weak)); 16 - EXPORT_SYMBOL(__gcov_exit);