]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: arm64/poly1305 - move data to rodata section
authorJia He <justin.he@arm.com>
Tue, 6 Aug 2024 05:54:44 +0000 (05:54 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 17 Aug 2024 05:55:49 +0000 (13:55 +0800)
When objtool gains support for ARM in the future, it may encounter issues
disassembling the following data in the .text section:
> .Lzeros:
> .long   0,0,0,0,0,0,0,0
> .asciz  "Poly1305 for ARMv8, CRYPTOGAMS by \@dot-asm"
> .align  2

Move it to .rodata which is a more appropriate section for read-only data.

There is a limit on how far the label can be from the instruction, hence
use "adrp" and low 12bits offset of the label to avoid the compilation
error.

Signed-off-by: Jia He <justin.he@arm.com>
Tested-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/poly1305-armv8.pl

index cbc980fb02e3357feb25aad8f93c1ec86c11247d..22c9069c065054c5a8f0430fa3161045aca51a99 100644 (file)
@@ -473,7 +473,8 @@ poly1305_blocks_neon:
        subs    $len,$len,#64
        ldp     x9,x13,[$inp,#48]
        add     $in2,$inp,#96
-       adr     $zeros,.Lzeros
+       adrp    $zeros,.Lzeros
+       add     $zeros,$zeros,#:lo12:.Lzeros
 
        lsl     $padbit,$padbit,#24
        add     x15,$ctx,#48
@@ -885,10 +886,13 @@ poly1305_blocks_neon:
        ret
 .size  poly1305_blocks_neon,.-poly1305_blocks_neon
 
+.pushsection .rodata
 .align 5
 .Lzeros:
 .long  0,0,0,0,0,0,0,0
 .asciz "Poly1305 for ARMv8, CRYPTOGAMS by \@dot-asm"
+.popsection
+
 .align 2
 #if !defined(__KERNEL__) && !defined(_WIN64)
 .comm  OPENSSL_armcap_P,4,4