summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorAlexandre Chartre <alexandre.chartre@oracle.com>2025-11-21 10:53:35 +0100
committerPeter Zijlstra <peterz@infradead.org>2025-11-21 15:30:14 +0100
commitbe5ee60ac554c6189cda963e886c4b97d2cb978c (patch)
tree69ceafd770bba3e8d44e24f31a278b686502954f /tools/objtool/check.c
parent4aae0d3f77b1104e55847870d15c3749ca575fcf (diff)
objtool: Provide access to feature and flags of group alternatives
Each alternative of a group alternative depends on a specific feature and flags. Provide access to the feature/flags for each alternative as an attribute (feature) in struct alt_group. Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://patch.msgid.link/20251121095340.464045-26-alexandre.chartre@oracle.com
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f75364f20bf1..9ec0e07cce90 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1751,6 +1751,7 @@ static int handle_group_alt(struct objtool_file *file,
orig_alt_group->last_insn = last_orig_insn;
orig_alt_group->nop = NULL;
orig_alt_group->ignore = orig_insn->ignore_alts;
+ orig_alt_group->feature = 0;
} else {
if (orig_alt_group->last_insn->offset + orig_alt_group->last_insn->len -
orig_alt_group->first_insn->offset != special_alt->orig_len) {
@@ -1855,6 +1856,7 @@ end:
new_alt_group->nop = nop;
new_alt_group->ignore = (*new_insn)->ignore_alts;
new_alt_group->cfi = orig_alt_group->cfi;
+ new_alt_group->feature = special_alt->feature;
return 0;
}