-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update windows alignment patch to be more targeted
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
commit f51fe0c900b1a3adf281da6ea7ea45421f6ab424 | ||
commit b493cd50343b0cfed8010654769f156626ac7832 | ||
Author: Brent Cook <[email protected]> | ||
Date: Mon Jan 8 21:54:21 2024 -0600 | ||
Date: Sun Feb 4 22:53:59 2024 -0600 | ||
|
||
align sections on masm/windows to 64 bytes | ||
align read-only sections on masm/windows to 64 bytes | ||
|
||
Avoid conflicts where alignment is specified later in the underlying | ||
assembly. | ||
|
||
diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl | ||
index 5dbed2a8c..37dfcdbc9 100755 | ||
index 5dbed2a8c..d62780c2c 100755 | ||
--- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl | ||
+++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl | ||
@@ -567,7 +567,7 @@ my %globals; | ||
@@ -567,7 +567,13 @@ my %globals; | ||
$v.="$line\tSEGMENT"; | ||
if ($line=~/\.([prx])data/) { | ||
$v.=" READONLY"; | ||
- $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); | ||
+ $v.=" ALIGN(64)"; | ||
+ if ($masm>=$masmref) { | ||
+ if ($line=~/\.rdata/) { | ||
+ $v.=" ALIGN(64)"; | ||
+ } else { | ||
+ $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")"; | ||
+ } | ||
+ } | ||
} elsif ($line=~/\.CRT\$/i) { | ||
$v.=" READONLY "; | ||
$v.=$masm>=$masmref ? "ALIGN(8)" : "DWORD"; |