summaryrefslogtreecommitdiff
path: root/tools/objtool/special.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-10-26 15:01:36 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-10-29 00:25:25 +0300
commit134ab5bd1883312d7a4b3033b05c6b5a1bb8889b (patch)
tree39d11f68c60a068c6d5ed56688e89a3907fe0ad4 /tools/objtool/special.c
parentc509331b41b7365e17396c246e8c5797bccc8074 (diff)
downloadlinux-134ab5bd1883312d7a4b3033b05c6b5a1bb8889b.tar.xz
objtool,x86: Replace alternatives with .retpoline_sites
Instead of writing complete alternatives, simply provide a list of all the retpoline thunk calls. Then the kernel is free to do with them as it pleases. Simpler code all-round. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Borislav Petkov <bp@suse.de> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Tested-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/r/20211026120309.850007165@infradead.org
Diffstat (limited to 'tools/objtool/special.c')
-rw-r--r--tools/objtool/special.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tools/objtool/special.c b/tools/objtool/special.c
index 06c3eacab3d5..e2223dd91c37 100644
--- a/tools/objtool/special.c
+++ b/tools/objtool/special.c
@@ -109,14 +109,6 @@ static int get_alt_entry(struct elf *elf, struct special_entry *entry,
return -1;
}
- /*
- * Skip retpoline .altinstr_replacement... we already rewrite the
- * instructions for retpolines anyway, see arch_is_retpoline()
- * usage in add_{call,jump}_destinations().
- */
- if (arch_is_retpoline(new_reloc->sym))
- return 1;
-
reloc_to_sec_off(new_reloc, &alt->new_sec, &alt->new_off);
/* _ASM_EXTABLE_EX hack */