diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2016-04-14 14:52:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-04-15 11:42:13 +0200 |
commit | 7e578441a4a3bba2a79426ca0f709c801210d08e (patch) | |
tree | ba0a5c34fa911f60a86aec77bf36cd39cf40bace /tools/power | |
parent | 806fdcce017dc98c4dbf8ed001750a0d7d2bb0af (diff) | |
download | op-kernel-dev-7e578441a4a3bba2a79426ca0f709c801210d08e.zip op-kernel-dev-7e578441a4a3bba2a79426ca0f709c801210d08e.tar.gz |
objtool: Add workaround for GCC switch jump table bug
GCC has a rare quirk, currently only seen in three driver functions in
the kernel, and only with certain obscure non-distro configs, which can
cause objtool to produce "unreachable instruction" false positive
warnings.
As part of an optimization, GCC makes a copy of an existing switch jump
table, modifies it, and then hard-codes the jump (albeit with an
indirect jump) to use a single entry in the table. The rest of the jump
table and some of its jump targets remain as dead code.
In such a case we can just crudely ignore all unreachable instruction
warnings for the entire object file. Ideally we would just ignore them
for the function, but that would require redesigning the code quite a
bit. And honestly that's just not worth doing: unreachable instruction
warnings are of questionable value anyway, and this is a very rare
issue.
kbuild reports:
https://lkml.kernel.org/r/201603231906.LWcVUpxm%25fengguang.wu@intel.com
https://lkml.kernel.org/r/201603271114.K9i45biy%25fengguang.wu@intel.com
https://lkml.kernel.org/r/201603291058.zuJ6ben1%25fengguang.wu@intel.com
GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70604
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/700fa029bbb0feff34f03ffc69d666a3c3b57a61.1460663532.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/power')
0 files changed, 0 insertions, 0 deletions