summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-02-23 08:49:02 +0000
committertb <>2023-02-23 08:49:02 +0000
commit27ab21352c93b54377d9ed93aaf71847680fa75f (patch)
tree1116424c4facb2ae6cd68f703e73e4c7a6c4fe1f
parent8e41b0309d34d49d21759656100773c83a9fc5f0 (diff)
downloadopenbsd-27ab21352c93b54377d9ed93aaf71847680fa75f.tar.gz
openbsd-27ab21352c93b54377d9ed93aaf71847680fa75f.tar.bz2
openbsd-27ab21352c93b54377d9ed93aaf71847680fa75f.zip
Fix up the .rodata segment's name for Windows as well.
Here we need .rdata with some alignment goo. Fortunately, this was already present for .pdata and .xdata, so the change is easy. Also, this is a code path that doesn't affect OpenBSD at all. ok jsing miod
-rwxr-xr-xsrc/lib/libcrypto/perlasm/x86_64-xlate.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl
index 642fc0090f..5dbed2a8c4 100755
--- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl
+++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl
@@ -553,9 +553,10 @@ my %globals;
553 /\.section/ && do { my $v=undef; 553 /\.section/ && do { my $v=undef;
554 $line =~ s/([^,]*).*/$1/; 554 $line =~ s/([^,]*).*/$1/;
555 $line = ".CRT\$XCU" if ($line eq ".init"); 555 $line = ".CRT\$XCU" if ($line eq ".init");
556 $line = ".rdata" if ($line eq ".rodata");
556 if ($nasm) { 557 if ($nasm) {
557 $v="section $line"; 558 $v="section $line";
558 if ($line=~/\.([px])data/) { 559 if ($line=~/\.([prx])data/) {
559 $v.=" rdata align="; 560 $v.=" rdata align=";
560 $v.=$1 eq "p"? 4 : 8; 561 $v.=$1 eq "p"? 4 : 8;
561 } elsif ($line=~/\.CRT\$/i) { 562 } elsif ($line=~/\.CRT\$/i) {
@@ -564,7 +565,7 @@ my %globals;
564 } else { 565 } else {
565 $v="$current_segment\tENDS\n" if ($current_segment); 566 $v="$current_segment\tENDS\n" if ($current_segment);
566 $v.="$line\tSEGMENT"; 567 $v.="$line\tSEGMENT";
567 if ($line=~/\.([px])data/) { 568 if ($line=~/\.([prx])data/) {
568 $v.=" READONLY"; 569 $v.=" READONLY";
569 $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); 570 $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref);
570 } elsif ($line=~/\.CRT\$/i) { 571 } elsif ($line=~/\.CRT\$/i) {