From: bcook Date: Tue, 27 Feb 2024 13:12:33 +0000 (+0000) Subject: align read-only sections on masm/windows to 64 bytes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2e312c038448f052b3693995aa570c3d2e0ede68;p=openbsd align read-only sections on masm/windows to 64 bytes Avoid conflicts where alignment is specified later in the underlying assembly. ok tb@ --- 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";