Commit 65f109e1 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'objtool-core-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool updates from Ingo Molnar:

 - Remove the "ANNOTATE_NOENDBR on ENDBR" warning: it's not really
   useful and only found a non-bug false positive so far.

 - Properly decode LOOP/LOOPE/LOOPNE, which were missing from the x86
   decoder. Because these instructions are rather ineffective, they
   never showed up in compiler output, but they are simple enough to
   support, so add them for completeness.

 - A bit more cross-arch preparatory work.

* tag 'objtool-core-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool,x86: Teach decode about LOOP* instructions
  objtool: Remove "ANNOTATE_NOENDBR on ENDBR" warning
  objtool: Use arch_jump_destination() in read_intra_function_calls()
parents 3e71f016 7a7621df
......@@ -635,6 +635,12 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
*type = INSN_CONTEXT_SWITCH;
break;
case 0xe0: /* loopne */
case 0xe1: /* loope */
case 0xe2: /* loop */
*type = INSN_JUMP_CONDITIONAL;
break;
case 0xe8:
*type = INSN_CALL;
/*
......
......@@ -2107,9 +2107,6 @@ static int read_noendbr_hints(struct objtool_file *file)
return -1;
}
if (insn->type == INSN_ENDBR)
WARN_FUNC("ANNOTATE_NOENDBR on ENDBR", insn->sec, insn->offset);
insn->noendbr = 1;
}
......@@ -2238,7 +2235,7 @@ static int read_intra_function_calls(struct objtool_file *file)
*/
insn->type = INSN_JUMP_UNCONDITIONAL;
dest_off = insn->offset + insn->len + insn->immediate;
dest_off = arch_jump_destination(insn);
insn->jump_dest = find_insn(file, insn->sec, dest_off);
if (!insn->jump_dest) {
WARN_FUNC("can't find call dest at %s+0x%lx",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment