From: Ard Biesheuvel <[email protected]>

Annotate the indirect jump with a relocation that correlates it with the
jump table emitted into .rodata. This helps objtool identify the jump
table, allowing it to infer the places in the code that are reachable
from the jump.

Signed-off-by: Ard Biesheuvel <[email protected]>
---
 arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S 
b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
index 45b005935194..7292090e76dd 100644
--- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
+++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
@@ -171,6 +171,7 @@ SYM_FUNC_START(crc_pcl)
        leaq    jump_table(%rip), %bufp
        movslq  (%bufp,%rax,4), len
        addq    len, %bufp
+       .reloc  ., R_X86_64_NONE, jump_table
        JMP_NOSPEC bufp
 
        ################################################################
@@ -327,6 +328,8 @@ JMPTBL_ENTRY %i
        i=i+1
 .endr
 
+.size  jump_table, . - jump_table
+.type  jump_table, @object
 
        ################################################################
        ## PCLMULQDQ tables
-- 
2.47.0.rc1.288.g06298d1525-goog


Reply via email to