diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-08-23 15:36:50 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-09-15 21:37:13 +0200 |
commit | 786b2384bf1c1b53dc23dc493aaaae29ef01e6ce (patch) | |
tree | da587d75161c565cf98e9b3acfaf0b0a99898408 /kernel/gcov | |
parent | 324f80cc3ee5b748735ba46288d4b2e0eb844ed7 (diff) |
um: Enable CONFIG_CONSTRUCTORS
We do need to call the constructors for *modules*, and
at least for KASAN in the future, we must call even the
kernel constructors only later when the kernel has been
initialized.
Instead of relying on libc to call them, emit an empty
section for libc and let the kernel's CONSTRUCTORS code
do the rest of the job.
Tested that it indeed doesn't work in modules, and does
work after the fixes in both, with a few functions with
__attribute__((constructor)) in both dynamic and static
builds.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'kernel/gcov')
-rw-r--r-- | kernel/gcov/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index 3941a9c48f83..060e8e726755 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -4,7 +4,7 @@ menu "GCOV-based kernel profiling" config GCOV_KERNEL bool "Enable gcov-based kernel profiling" depends on DEBUG_FS - select CONSTRUCTORS if !UML + select CONSTRUCTORS default n ---help--- This option enables gcov-based code profiling (e.g. for code coverage |