linux/tools/objtool
Peter Zijlstra 270a69c448 x86/alternative: Support relocations in alternatives
A little while ago someone (Kirill) ran into the whole 'alternatives don't
do relocations nonsense' again and I got annoyed enough to actually look
at the code.

Since the whole alternative machinery already fully decodes the
instructions it is simple enough to adjust immediates and displacement
when needed. Specifically, the immediates for IP modifying instructions
(JMP, CALL, Jcc) and the displacement for RIP-relative instructions.

  [ bp: Massage comment some more and get rid of third loop in
    apply_relocation(). ]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230208171431.313857925@infradead.org
2023-05-10 14:47:08 +02:00
..
arch x86/alternative: Support relocations in alternatives 2023-05-10 14:47:08 +02:00
Documentation docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
include/objtool objtool: Add symbol iteration helpers 2023-04-14 16:08:29 +02:00
.gitignore objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
Build objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
builtin-check.c objtool: Make struct check_options static 2023-02-01 09:15:23 -08:00
check.c Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
elf.c objtool: Add symbol iteration helpers 2023-04-14 16:08:29 +02:00
Makefile objtool: Fix HOSTCC flag usage 2023-02-01 09:15:18 -08:00
objtool.c objtool: Remove instruction::list 2023-02-23 09:21:44 +01:00
orc_dump.c x86,objtool: Split UNWIND_HINT_EMPTY in two 2023-03-23 23:18:58 +01:00
orc_gen.c objtool: Add WARN_INSN() 2023-04-14 16:08:28 +02:00
special.c objtool: Make struct entries[] static and const 2023-02-01 09:15:22 -08:00
sync-check.sh objtool: Add objtool_types.h 2023-03-23 23:18:56 +01:00
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00