From: tb Date: Thu, 9 Feb 2023 19:57:00 +0000 (+0000) Subject: Use .section .rodata instead of a plain .rodata X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=eda85684cdcfde70d84443a28caf40467d147bfc;p=openbsd Use .section .rodata instead of a plain .rodata At least gcc 12 on Fedora is very unhappy about a plain .rodata and throws Error: unknown pseudo-op: `.rodata'. So add a .section in front of it to make it happy. ok deraadt miod --- diff --git a/lib/libcrypto/aes/asm/aes-x86_64.pl b/lib/libcrypto/aes/asm/aes-x86_64.pl index d9f501b2529..2986a9fcc69 100755 --- a/lib/libcrypto/aes/asm/aes-x86_64.pl +++ b/lib/libcrypto/aes/asm/aes-x86_64.pl @@ -2113,7 +2113,7 @@ ___ } $code.=<<___; -.rodata +.section .rodata .align 64 .LAES_Te: ___ diff --git a/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl b/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl index 4e83b6ba493..8a428c9b157 100644 --- a/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl +++ b/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl @@ -1075,7 +1075,7 @@ $code.=<<___; ___ } $code.=<<___; -.rodata +.section .rodata .align 64 K_XX_XX: .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 diff --git a/lib/libcrypto/aes/asm/aesni-x86_64.pl b/lib/libcrypto/aes/asm/aesni-x86_64.pl index 1ec76f529ec..1af4c5bad97 100644 --- a/lib/libcrypto/aes/asm/aesni-x86_64.pl +++ b/lib/libcrypto/aes/asm/aesni-x86_64.pl @@ -2720,7 +2720,7 @@ ___ } $code.=<<___; -.rodata +.section .rodata .align 64 .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 diff --git a/lib/libcrypto/aes/asm/bsaes-x86_64.pl b/lib/libcrypto/aes/asm/bsaes-x86_64.pl index a40f836010b..347f4c30253 100644 --- a/lib/libcrypto/aes/asm/bsaes-x86_64.pl +++ b/lib/libcrypto/aes/asm/bsaes-x86_64.pl @@ -2882,7 +2882,7 @@ $code.=<<___; ___ } $code.=<<___; -.rodata +.section .rodata .type _bsaes_const,\@object .align 64 _bsaes_const: diff --git a/lib/libcrypto/aes/asm/vpaes-x86_64.pl b/lib/libcrypto/aes/asm/vpaes-x86_64.pl index 63af96c1dd3..ad5fa7522f9 100644 --- a/lib/libcrypto/aes/asm/vpaes-x86_64.pl +++ b/lib/libcrypto/aes/asm/vpaes-x86_64.pl @@ -964,7 +964,7 @@ _vpaes_preheat: ## Constants ## ## ## ######################################################## -.rodata +.section .rodata .type _vpaes_consts,\@object .align 64 _vpaes_consts: diff --git a/lib/libcrypto/bn/asm/x86_64-mont5.pl b/lib/libcrypto/bn/asm/x86_64-mont5.pl index 5d30f210ce0..1c8aa255c3c 100755 --- a/lib/libcrypto/bn/asm/x86_64-mont5.pl +++ b/lib/libcrypto/bn/asm/x86_64-mont5.pl @@ -1032,7 +1032,7 @@ $code.=<<___; ___ } $code.=<<___; -.rodata +.section .rodata .align 64 .Linc: .long 0,0, 1,1 diff --git a/lib/libcrypto/camellia/asm/cmll-x86_64.pl b/lib/libcrypto/camellia/asm/cmll-x86_64.pl index 90c56d9e500..c16725f5c99 100644 --- a/lib/libcrypto/camellia/asm/cmll-x86_64.pl +++ b/lib/libcrypto/camellia/asm/cmll-x86_64.pl @@ -599,7 +599,7 @@ sub S0222 { my $i=shift; $i=@SBOX[$i]; $i=($i<<1|$i>>7)&0xff; $i=$i<<16|$i<<8|$i sub S3033 { my $i=shift; $i=@SBOX[$i]; $i=($i>>1|$i<<7)&0xff; $i=$i<<24|$i<<8|$i; sprintf("0x%08x",$i); } $code.=<<___; -.rodata +.section .rodata .align 64 .LCamellia_SIGMA: .long 0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858 diff --git a/lib/libcrypto/modes/asm/ghash-x86_64.pl b/lib/libcrypto/modes/asm/ghash-x86_64.pl index 3ae8629cbec..bce62947f91 100644 --- a/lib/libcrypto/modes/asm/ghash-x86_64.pl +++ b/lib/libcrypto/modes/asm/ghash-x86_64.pl @@ -622,7 +622,7 @@ ___ } $code.=<<___; -.rodata +.section .rodata .align 64 .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 diff --git a/lib/libcrypto/perlasm/x86gas.pl b/lib/libcrypto/perlasm/x86gas.pl index f28a590549b..b84e28be97e 100644 --- a/lib/libcrypto/perlasm/x86gas.pl +++ b/lib/libcrypto/perlasm/x86gas.pl @@ -307,7 +307,7 @@ sub ::dataseg { push(@out,".data\n"); } sub ::rodataseg -{ push(@out,".rodata\n"); } +{ push(@out,".section .rodata\n"); } sub ::previous { push(@out,".previous\n"); } diff --git a/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/lib/libcrypto/rc4/asm/rc4-x86_64.pl index 36cbf79fbe4..c51112ce1ed 100755 --- a/lib/libcrypto/rc4/asm/rc4-x86_64.pl +++ b/lib/libcrypto/rc4/asm/rc4-x86_64.pl @@ -517,7 +517,7 @@ RC4_options: add \$12,%rax .Ldone: ret -.rodata +.section .rodata .align 64 .Lopts: .asciz "rc4(8x,int)" diff --git a/lib/libcrypto/sha/asm/sha1-x86_64.pl b/lib/libcrypto/sha/asm/sha1-x86_64.pl index 0abbbab6ba9..1ec7f609a5a 100755 --- a/lib/libcrypto/sha/asm/sha1-x86_64.pl +++ b/lib/libcrypto/sha/asm/sha1-x86_64.pl @@ -1071,7 +1071,7 @@ $code.=<<___; ___ } $code.=<<___; -.rodata +.section .rodata .align 64 K_XX_XX: .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 diff --git a/lib/libcrypto/sha/asm/sha512-ppc.pl b/lib/libcrypto/sha/asm/sha512-ppc.pl index 1f02cfdd564..28bd997cf8b 100755 --- a/lib/libcrypto/sha/asm/sha512-ppc.pl +++ b/lib/libcrypto/sha/asm/sha512-ppc.pl @@ -375,7 +375,7 @@ $code.=<<___; $ST $H,`7*$SZ`($ctx) bne Lsha2_block_private blr - .rodata + .section .rodata Ltable: ___ $code.=<<___ if ($SZ==8); diff --git a/lib/libcrypto/sha/asm/sha512-x86_64.pl b/lib/libcrypto/sha/asm/sha512-x86_64.pl index 6698b1d406f..1a7d9bf2d3f 100755 --- a/lib/libcrypto/sha/asm/sha512-x86_64.pl +++ b/lib/libcrypto/sha/asm/sha512-x86_64.pl @@ -269,7 +269,7 @@ ___ if ($SZ==4) { $code.=<<___; -.rodata +.section .rodata .align 64 .type $TABLE,\@object $TABLE: @@ -293,7 +293,7 @@ $TABLE: ___ } else { $code.=<<___; -.rodata +.section .rodata .align 64 .type $TABLE,\@object $TABLE: diff --git a/lib/libcrypto/whrlpool/asm/wp-x86_64.pl b/lib/libcrypto/whrlpool/asm/wp-x86_64.pl index 510a74b91ad..de5d3acfb40 100644 --- a/lib/libcrypto/whrlpool/asm/wp-x86_64.pl +++ b/lib/libcrypto/whrlpool/asm/wp-x86_64.pl @@ -204,7 +204,7 @@ $code.=<<___; ret .size $func,.-$func -.rodata +.section .rodata .align 64 .type $table,\@object $table: