diff options
author | bcook <> | 2024-02-27 13:12:33 +0000 |
---|---|---|
committer | bcook <> | 2024-02-27 13:12:33 +0000 |
commit | 6920c18fc4798d2293a62e05be55f58e1c775350 (patch) | |
tree | 5eed254de8a8a4d427338e4964c7c99f8de54907 | |
parent | 11ef2217cacdb92184e7ebd704666c7ad611fceb (diff) | |
download | openbsd-6920c18fc4798d2293a62e05be55f58e1c775350.tar.gz openbsd-6920c18fc4798d2293a62e05be55f58e1c775350.tar.bz2 openbsd-6920c18fc4798d2293a62e05be55f58e1c775350.zip |
align read-only sections on masm/windows to 64 bytes
Avoid conflicts where alignment is specified later in the underlying
assembly.
ok tb@
-rwxr-xr-x | src/lib/libcrypto/perlasm/x86_64-xlate.pl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl index 325e7cf583..1e54753123 100755 --- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl +++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl | |||
@@ -567,7 +567,15 @@ my %globals; | |||
567 | $v.="$line\tSEGMENT"; | 567 | $v.="$line\tSEGMENT"; |
568 | if ($line=~/\.([prx])data/) { | 568 | if ($line=~/\.([prx])data/) { |
569 | $v.=" READONLY"; | 569 | $v.=" READONLY"; |
570 | $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); | 570 | if ($masm>=$masmref) { |
571 | if ($1 eq "r") { | ||
572 | $v.=" ALIGN(64)"; | ||
573 | } elsif ($1 eq "p") { | ||
574 | $v.=" ALIGN(4)"; | ||
575 | } else { | ||
576 | $v.=" ALIGN(8)"; | ||
577 | } | ||
578 | } | ||
571 | } elsif ($line=~/\.CRT\$/i) { | 579 | } elsif ($line=~/\.CRT\$/i) { |
572 | $v.=" READONLY "; | 580 | $v.=" READONLY "; |
573 | $v.=$masm>=$masmref ? "ALIGN(8)" : "DWORD"; | 581 | $v.=$masm>=$masmref ? "ALIGN(8)" : "DWORD"; |