diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-05-06 21:34:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-05-12 14:54:55 +0200 |
commit | cbf82a3dc241aea82b941a872ed5c52f6af527ea (patch) | |
tree | e47c96646bba61f34939a7807e371a7b00b87d0c /tools/objtool/arch | |
parent | e7bf1ba97afdde75b0ef43e4bdb718bf843613f1 (diff) | |
download | linux-stable-cbf82a3dc241aea82b941a872ed5c52f6af527ea.tar.gz linux-stable-cbf82a3dc241aea82b941a872ed5c52f6af527ea.tar.bz2 linux-stable-cbf82a3dc241aea82b941a872ed5c52f6af527ea.zip |
objtool: Decode jump_entry::key addend
Teach objtool about the the low bits in the struct static_key pointer.
That is, the low two bits of @key in:
struct jump_entry {
s32 code;
s32 target;
long key;
}
as found in the __jump_table section. Since @key has a relocation to
the variable (to be resolved by the linker), the low two bits will be
reflected in the relocation's addend.
As such, find the reloc and store the addend, such that we can access
these bits.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210506194158.028024143@infradead.org
Diffstat (limited to 'tools/objtool/arch')
-rw-r--r-- | tools/objtool/arch/x86/include/arch/special.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/arch/x86/include/arch/special.h b/tools/objtool/arch/x86/include/arch/special.h index 14271cca0c74..f2918f789a0a 100644 --- a/tools/objtool/arch/x86/include/arch/special.h +++ b/tools/objtool/arch/x86/include/arch/special.h @@ -9,6 +9,7 @@ #define JUMP_ENTRY_SIZE 16 #define JUMP_ORIG_OFFSET 0 #define JUMP_NEW_OFFSET 4 +#define JUMP_KEY_OFFSET 8 #define ALT_ENTRY_SIZE 12 #define ALT_ORIG_OFFSET 0 |