libressl-portable/patches/asm/0003-Revert-Use-.section-.rodata-instead-of-a-plain-.roda.patch
Brent Cook 98a5122bc6 portable asm generator patches for portable
This reverses changes from the 3.8.x upstream that are causing issues on
a few different platforms, including macOS x64, Windows, and older
Linux/FreeBSD.
2023-10-30 22:55:29 -05:00

204 lines
6.3 KiB
Diff
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 1407448470aff891f9a9eff550ecda06202ffd29 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 30 Oct 2023 22:00:49 -0500
Subject: [PATCH 3/4] Revert "Use .section .rodata instead of a plain .rodata"
This reverts commit 67afc07de0ed3a0ccc272df42853ba565a8277c6.
---
src/lib/libcrypto/aes/asm/aes-x86_64.pl | 2 +-
src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | 2 +-
src/lib/libcrypto/aes/asm/aesni-x86_64.pl | 2 +-
src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | 2 +-
src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | 2 +-
src/lib/libcrypto/bn/asm/x86_64-mont5.pl | 2 +-
src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | 2 +-
src/lib/libcrypto/modes/asm/ghash-x86_64.pl | 2 +-
src/lib/libcrypto/perlasm/x86gas.pl | 2 +-
src/lib/libcrypto/sha/asm/sha1-x86_64.pl | 2 +-
src/lib/libcrypto/sha/asm/sha512-ppc.pl | 2 +-
src/lib/libcrypto/sha/asm/sha512-x86_64.pl | 4 ++--
src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl | 2 +-
13 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/lib/libcrypto/aes/asm/aes-x86_64.pl b/src/lib/libcrypto/aes/asm/aes-x86_64.pl
index 2986a9fcc..d9f501b25 100755
--- a/src/lib/libcrypto/aes/asm/aes-x86_64.pl
+++ b/src/lib/libcrypto/aes/asm/aes-x86_64.pl
@@ -2113,7 +2113,7 @@ ___
}
$code.=<<___;
-.section .rodata
+.rodata
.align 64
.LAES_Te:
___
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 8a428c9b1..4e83b6ba4 100644
--- a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl
+++ b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl
@@ -1075,7 +1075,7 @@ $code.=<<___;
___
}
$code.=<<___;
-.section .rodata
+.rodata
.align 64
K_XX_XX:
.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19
diff --git a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl
index 09612b1f8..2ab7106c0 100644
--- a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl
+++ b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl
@@ -2721,7 +2721,7 @@ ___
}
$code.=<<___;
-.section .rodata
+.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/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl
index 347f4c302..a40f83601 100644
--- a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl
+++ b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl
@@ -2882,7 +2882,7 @@ $code.=<<___;
___
}
$code.=<<___;
-.section .rodata
+.rodata
.type _bsaes_const,\@object
.align 64
_bsaes_const:
diff --git a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl
index ad5fa7522..63af96c1d 100644
--- a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl
+++ b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl
@@ -964,7 +964,7 @@ _vpaes_preheat:
## Constants ##
## ##
########################################################
-.section .rodata
+.rodata
.type _vpaes_consts,\@object
.align 64
_vpaes_consts:
diff --git a/src/lib/libcrypto/bn/asm/x86_64-mont5.pl b/src/lib/libcrypto/bn/asm/x86_64-mont5.pl
index 1c8aa255c..5d30f210c 100755
--- a/src/lib/libcrypto/bn/asm/x86_64-mont5.pl
+++ b/src/lib/libcrypto/bn/asm/x86_64-mont5.pl
@@ -1032,7 +1032,7 @@ $code.=<<___;
___
}
$code.=<<___;
-.section .rodata
+.rodata
.align 64
.Linc:
.long 0,0, 1,1
diff --git a/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl b/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl
index c16725f5c..90c56d9e5 100644
--- a/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl
+++ b/src/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.=<<___;
-.section .rodata
+.rodata
.align 64
.LCamellia_SIGMA:
.long 0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858
diff --git a/src/lib/libcrypto/modes/asm/ghash-x86_64.pl b/src/lib/libcrypto/modes/asm/ghash-x86_64.pl
index bce62947f..3ae8629cb 100644
--- a/src/lib/libcrypto/modes/asm/ghash-x86_64.pl
+++ b/src/lib/libcrypto/modes/asm/ghash-x86_64.pl
@@ -622,7 +622,7 @@ ___
}
$code.=<<___;
-.section .rodata
+.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/src/lib/libcrypto/perlasm/x86gas.pl b/src/lib/libcrypto/perlasm/x86gas.pl
index b84e28be9..f28a59054 100644
--- a/src/lib/libcrypto/perlasm/x86gas.pl
+++ b/src/lib/libcrypto/perlasm/x86gas.pl
@@ -307,7 +307,7 @@ sub ::dataseg
{ push(@out,".data\n"); }
sub ::rodataseg
-{ push(@out,".section .rodata\n"); }
+{ push(@out,".rodata\n"); }
sub ::previous
{ push(@out,".previous\n"); }
diff --git a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl
index 1ec7f609a..0abbbab6b 100755
--- a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl
+++ b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl
@@ -1071,7 +1071,7 @@ $code.=<<___;
___
}
$code.=<<___;
-.section .rodata
+.rodata
.align 64
K_XX_XX:
.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19
diff --git a/src/lib/libcrypto/sha/asm/sha512-ppc.pl b/src/lib/libcrypto/sha/asm/sha512-ppc.pl
index 28bd997cf..1f02cfdd5 100755
--- a/src/lib/libcrypto/sha/asm/sha512-ppc.pl
+++ b/src/lib/libcrypto/sha/asm/sha512-ppc.pl
@@ -375,7 +375,7 @@ $code.=<<___;
$ST $H,`7*$SZ`($ctx)
bne Lsha2_block_private
blr
- .section .rodata
+ .rodata
Ltable:
___
$code.=<<___ if ($SZ==8);
diff --git a/src/lib/libcrypto/sha/asm/sha512-x86_64.pl b/src/lib/libcrypto/sha/asm/sha512-x86_64.pl
index 1a7d9bf2d..6698b1d40 100755
--- a/src/lib/libcrypto/sha/asm/sha512-x86_64.pl
+++ b/src/lib/libcrypto/sha/asm/sha512-x86_64.pl
@@ -269,7 +269,7 @@ ___
if ($SZ==4) {
$code.=<<___;
-.section .rodata
+.rodata
.align 64
.type $TABLE,\@object
$TABLE:
@@ -293,7 +293,7 @@ $TABLE:
___
} else {
$code.=<<___;
-.section .rodata
+.rodata
.align 64
.type $TABLE,\@object
$TABLE:
diff --git a/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl b/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl
index de5d3acfb..510a74b91 100644
--- a/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl
+++ b/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl
@@ -204,7 +204,7 @@ $code.=<<___;
ret
.size $func,.-$func
-.section .rodata
+.rodata
.align 64
.type $table,\@object
$table:
--
2.42.0