diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-12-18 14:19:32 -0600 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2021-01-14 09:53:48 -0600 |
commit | b23cc71c62747f2e4c3e56138872cf47e1294f8a (patch) | |
tree | 5c8b897f91385b546a6f7ab7115ac3d0a41e0801 /tools/objtool/include | |
parent | ab4e0744e99b87e1a223e89fc3c9ae44f727c9a6 (diff) | |
download | linux-b23cc71c62747f2e4c3e56138872cf47e1294f8a.tar.bz2 |
objtool: Add 'alt_group' struct
Create a new struct associated with each group of alternatives
instructions. This will help with the removal of fake jumps, and more
importantly with adding support for stack layout changes in
alternatives.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/include')
-rw-r--r-- | tools/objtool/include/objtool/check.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/objtool/include/objtool/check.h b/tools/objtool/include/objtool/check.h index df1e3e8ed204..7893e9783084 100644 --- a/tools/objtool/include/objtool/check.h +++ b/tools/objtool/include/objtool/check.h @@ -19,6 +19,17 @@ struct insn_state { s8 instr; }; +struct alt_group { + /* + * Pointer from a replacement group to the original group. NULL if it + * *is* the original group. + */ + struct alt_group *orig_group; + + /* First and last instructions in the group */ + struct instruction *first_insn, *last_insn; +}; + struct instruction { struct list_head list; struct hlist_node hash; @@ -34,7 +45,7 @@ struct instruction { s8 instr; u8 visited; u8 ret_offset; - int alt_group; + struct alt_group *alt_group; struct symbol *call_dest; struct instruction *jump_dest; struct instruction *first_jump_src; |