From 2e312c038448f052b3693995aa570c3d2e0ede68 Mon Sep 17 00:00:00 2001 From: bcook Date: Tue, 27 Feb 2024 13:12:33 +0000 Subject: [PATCH] align read-only sections on masm/windows to 64 bytes Avoid conflicts where alignment is specified later in the underlying assembly. ok tb@ --- lib/libcrypto/perlasm/x86_64-xlate.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/perlasm/x86_64-xlate.pl b/lib/libcrypto/perlasm/x86_64-xlate.pl index 325e7cf5833..1e547531230 100755 --- a/lib/libcrypto/perlasm/x86_64-xlate.pl +++ b/lib/libcrypto/perlasm/x86_64-xlate.pl @@ -567,7 +567,15 @@ my %globals; $v.="$line\tSEGMENT"; if ($line=~/\.([prx])data/) { $v.=" READONLY"; - $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); + if ($masm>=$masmref) { + if ($1 eq "r") { + $v.=" ALIGN(64)"; + } elsif ($1 eq "p") { + $v.=" ALIGN(4)"; + } else { + $v.=" ALIGN(8)"; + } + } } elsif ($line=~/\.CRT\$/i) { $v.=" READONLY "; $v.=$masm>=$masmref ? "ALIGN(8)" : "DWORD"; -- 2.20.1