diff options
authorJosh Poimboeuf <>2017-07-24 23:34:14 (GMT)
committerGreg Kroah-Hartman <>2018-06-13 14:16:44 (GMT)
commit23873aedff967436b59e478d75ca3317e4f0dfc5 (patch)
parente1fba17e26f08a142b4cdf5c74a2113e7f895daa (diff)
objtool: Fix gcov check for older versions of GCC
commit 867ac9d737094e46a6c33213f16dd1ec9e8bd5d5 upstream. Objtool tries to silence 'unreachable instruction' warnings when it detects gcov is enabled, because gcov produces a lot of unreachable instructions and they don't really matter. However, the 0-day bot is still reporting some unreachable instruction warnings with CONFIG_GCOV_KERNEL=y on GCC 4.6.4. As it turns out, objtool's gcov detection doesn't work with older versions of GCC because they don't create a bunch of symbols with the 'gcov.' prefix like newer versions of GCC do. Move the gcov check out of objtool and instead just create a new '--no-unreachable' flag which can be passed in by the kernel Makefile when CONFIG_GCOV_KERNEL is defined. Also rename the 'nofp' variable to 'no_fp' for consistency with the new 'no_unreachable' variable. Reported-by: kbuild test robot <> Signed-off-by: Josh Poimboeuf <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Fixes: 9cfffb116887 ("objtool: Skip all "unreachable instruction" warnings for gcov kernels") Link: Signed-off-by: Ingo Molnar <> [just as the other parts of this patch already applied - gregkh] Signed-off-by: Greg Kroah-Hartman <>
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/ b/scripts/
index 7675d11..abfd4f4 100644
--- a/scripts/
+++ b/scripts/
@@ -253,6 +253,9 @@ objtool_args = check
objtool_args += --no-fp
+objtool_args += --no-unreachable
# 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory
# 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file