summaryrefslogtreecommitdiff
path: root/tools/objtool/objtool.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-03-26 18:12:12 +0300
committerIngo Molnar <mingo@kernel.org>2021-04-02 13:45:27 +0300
commit43d5430ad74ef5156353af7aec352426ec7a8e57 (patch)
tree5ae512d57b4bb1535cc106c4e68e35ddd58d3085 /tools/objtool/objtool.c
parent2f2f7e47f0525cbaad5dd9675fd9d8aa8da12046 (diff)
downloadlinux-43d5430ad74ef5156353af7aec352426ec7a8e57.tar.xz
objtool: Keep track of retpoline call sites
Provide infrastructure for architectures to rewrite/augment compiler generated retpoline calls. Similar to what we do for static_call()s, keep track of the instructions that are retpoline calls. Use the same list_head, since a retpoline call cannot also be a static_call. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/20210326151300.130805730@infradead.org
Diffstat (limited to 'tools/objtool/objtool.c')
-rw-r--r--tools/objtool/objtool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index 7b97ce499405..3a3ea1b4e4da 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -61,6 +61,7 @@ struct objtool_file *objtool_open_read(const char *_objname)
INIT_LIST_HEAD(&file.insn_list);
hash_init(file.insn_hash);
+ INIT_LIST_HEAD(&file.retpoline_call_list);
INIT_LIST_HEAD(&file.static_call_list);
INIT_LIST_HEAD(&file.mcount_loc_list);
file.c_file = !vmlinux && find_section_by_name(file.elf, ".comment");