summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-02-23 08:49:02 +0000
committertb <>2023-02-23 08:49:02 +0000
commit9d264da3f3d1bdaa45983642efbea843e206531b (patch)
tree1116424c4facb2ae6cd68f703e73e4c7a6c4fe1f /src
parentd5de1f3861d2030cfaa1b610f7b9088d7e303f3b (diff)
downloadopenbsd-9d264da3f3d1bdaa45983642efbea843e206531b.tar.gz
openbsd-9d264da3f3d1bdaa45983642efbea843e206531b.tar.bz2
openbsd-9d264da3f3d1bdaa45983642efbea843e206531b.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
Diffstat (limited to 'src')
-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) {