objtool: Set insn->func for alternatives
authorPeter Zijlstra <peterz@infradead.org>
Mon, 25 Feb 2019 09:31:24 +0000 (10:31 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Apr 2019 09:02:24 +0000 (11:02 +0200)
In preparation of function attributes, we need each instruction to
have a valid link back to its function.

Therefore make sure we set the function association for alternative
instruction sequences; they are, after all, still part of the function.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/objtool/check.c

index 110ea3d8477240febfc75c4df429c5234a67ec38..950d0f62d22b37f208768e361465bf3ef38050b6 100644 (file)
@@ -695,6 +695,7 @@ static int handle_group_alt(struct objtool_file *file,
                last_new_insn = insn;
 
                insn->ignore = orig_insn->ignore_alts;
+               insn->func = orig_insn->func;
 
                if (insn->type != INSN_JUMP_CONDITIONAL &&
                    insn->type != INSN_JUMP_UNCONDITIONAL)