aboutsummaryrefslogtreecommitdiff
path: root/tools/objtool
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2019-02-25 10:31:24 +0100
committerIngo Molnar <[email protected]>2019-04-03 11:02:24 +0200
commita4d09dde9093a04a9b48fb9e5ef3177bdfaff199 (patch)
tree515fea511c16de926622d6751ed97390f826edba /tools/objtool
parent40ea97290b08be2e038b31cbb33097d1145e8169 (diff)
objtool: Set insn->func for alternatives
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) <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/objtool')
-rw-r--r--tools/objtool/check.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 110ea3d84772..950d0f62d22b 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -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)