diff --git a/tools/objtool/check.c b/tools/objtool/check.c index d45f0181f133..519af4be7018 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1025,6 +1025,18 @@ static int add_call_destinations(struct objtool_file *file) dest_off); return -1; } + + } else if (!strncmp(reloc->sym->name, "__x86_indirect_thunk_", 21)) { + /* + * Retpoline calls are really dynamic calls in + * disguise, so convert them accordingly. + */ + insn->type = INSN_CALL_DYNAMIC; + insn->retpoline_safe = true; + + remove_insn_ops(insn); + continue; + } else insn->call_dest = reloc->sym;