Skip to content

Commit 87cb582

Browse files
jpoimboeIngo Molnar
authored andcommitted
objtool: Fix false-positive "ignoring unreachables" warning
There's no need to try to automatically disable unreachable warnings if they've already been manually disabled due to CONFIG_KCOV quirks. This avoids a spurious warning with a KCOV kernel: fs/smb/client/cifs_unicode.o: warning: objtool: cifsConvertToUTF16.part.0+0xce5: ignoring unreachables due to jump table quirk Fixes: eeff7ac ("objtool: Warn when disabling unreachable warnings") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/5eb28eeb6a724b7d945a961cfdcf8d41e6edf3dc.1744238814.git.jpoimboe@kernel.org Closes: https://lore.kernel.org/r/202504090910.QkvTAR36-lkp@intel.com/
1 parent 2d12c6f commit 87cb582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/objtool/arch/x86/special.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct reloc *arch_find_switch_table(struct objtool_file *file,
126126
* indicates a rare GCC quirk/bug which can leave dead
127127
* code behind.
128128
*/
129-
if (reloc_type(text_reloc) == R_X86_64_PC32) {
129+
if (!file->ignore_unreachables && reloc_type(text_reloc) == R_X86_64_PC32) {
130130
WARN_INSN(insn, "ignoring unreachables due to jump table quirk");
131131
file->ignore_unreachables = true;
132132
}

0 commit comments

Comments
 (0)