Skip to content

Commit d2c3225

Browse files
joshtripletttorvalds
authored andcommitted
gcov: disable CONFIG_CONSTRUCTORS when not needed by CONFIG_GCOV_KERNEL
CONFIG_CONSTRUCTORS controls support for running constructor functions at kernel init time. According to commit b99b87f ("kernel: constructor support"), gcov (CONFIG_GCOV_KERNEL) needs this. However, CONFIG_CONSTRUCTORS currently defaults to y, with no option to disable it, and CONFIG_GCOV_KERNEL depends on it. Instead, default it to n and have CONFIG_GCOV_KERNEL select it, so that the normal case of CONFIG_GCOV_KERNEL=n will result in CONFIG_CONSTRUCTORS=n. Observed in the short list of =y values in a minimal kernel configuration. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b0461a4 commit d2c3225

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎init/Kconfig‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ config DEFCONFIG_LIST
1919
config CONSTRUCTORS
2020
bool
2121
depends on !UML
22-
default y
2322

2423
config HAVE_IRQ_WORK
2524
bool

‎kernel/gcov/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ menu "GCOV-based kernel profiling"
22

33
config GCOV_KERNEL
44
bool "Enable gcov-based kernel profiling"
5-
depends on DEBUG_FS && CONSTRUCTORS
5+
depends on DEBUG_FS
6+
select CONSTRUCTORS
67
default n
78
---help---
89
This option enables gcov-based code profiling (e.g. for code coverage

0 commit comments

Comments
 (0)