From eb72d17d580445c364a2dfb2d637026a00e779eb Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 14 Jan 2023 16:58:56 +0000 Subject: Move constants out of text segment into rodata to prepare for xonly support on amd64. no pic handling is neccessary since amd64 has full reach. ok kettenis --- src/lib/libcrypto/aes/asm/aes-x86_64.pl | 3 ++- src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | 4 ++-- src/lib/libcrypto/aes/asm/aesni-x86_64.pl | 4 ++-- src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | 3 ++- src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src/lib/libcrypto/aes') diff --git a/src/lib/libcrypto/aes/asm/aes-x86_64.pl b/src/lib/libcrypto/aes/asm/aes-x86_64.pl index 9072f603a9..d9f501b252 100755 --- a/src/lib/libcrypto/aes/asm/aes-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aes-x86_64.pl @@ -2113,6 +2113,7 @@ ___ } $code.=<<___; +.rodata .align 64 .LAES_Te: ___ @@ -2533,8 +2534,8 @@ ___ $code.=<<___; .long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe .long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.asciz "AES for x86_64, CRYPTOGAMS by " .align 64 +.previous ___ # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl index 880bcc2d58..4e83b6ba49 100644 --- a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl @@ -1075,6 +1075,7 @@ $code.=<<___; ___ } $code.=<<___; +.rodata .align 64 K_XX_XX: .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 @@ -1082,9 +1083,8 @@ K_XX_XX: .long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc # K_40_59 .long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 # K_60_79 .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask - -.asciz "AESNI-CBC+SHA1 stitch for x86_64, CRYPTOGAMS by " .align 64 +.previous ___ # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl index a849073728..1ec76f529e 100644 --- a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl @@ -2720,6 +2720,7 @@ ___ } $code.=<<___; +.rodata .align 64 .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 @@ -2729,9 +2730,8 @@ $code.=<<___; .long 1,0,0,0 .Lxts_magic: .long 0x87,0,1,0 - -.asciz "AES for Intel AES-NI, CRYPTOGAMS by " .align 64 +.previous ___ # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl index 14dc2c02e7..a40f836010 100644 --- a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl @@ -2882,6 +2882,7 @@ $code.=<<___; ___ } $code.=<<___; +.rodata .type _bsaes_const,\@object .align 64 _bsaes_const: @@ -2934,9 +2935,9 @@ _bsaes_const: .quad 0x02060a0e03070b0f, 0x0004080c0105090d .L63: .quad 0x6363636363636363, 0x6363636363636363 -.asciz "Bit-sliced AES for x86_64/SSSE3, Emilia Käsper, Peter Schwabe, Andy Polyakov" .align 64 .size _bsaes_const,.-_bsaes_const +.previous ___ # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, diff --git a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl index bd7f45b850..63af96c1dd 100644 --- a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl @@ -964,6 +964,7 @@ _vpaes_preheat: ## Constants ## ## ## ######################################################## +.rodata .type _vpaes_consts,\@object .align 64 _vpaes_consts: @@ -1060,9 +1061,9 @@ _vpaes_consts: .Lk_dsbo: # decryption sbox final output .quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D .quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C -.asciz "Vector Permutation AES for x86_64/SSSE3, Mike Hamburg (Stanford University)" .align 64 .size _vpaes_consts,.-_vpaes_consts +.previous ___ if ($win64) { -- cgit v1.2.3-55-g6feb