From: tb Date: Thu, 23 Feb 2023 08:49:02 +0000 (+0000) Subject: Fix up the .rodata segment's name for Windows as well. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2536c3e3692e9fc25715e79a926bbf9ef643540b;p=openbsd 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 --- diff --git a/lib/libcrypto/perlasm/x86_64-xlate.pl b/lib/libcrypto/perlasm/x86_64-xlate.pl index 642fc0090ff..5dbed2a8c49 100755 --- a/lib/libcrypto/perlasm/x86_64-xlate.pl +++ b/lib/libcrypto/perlasm/x86_64-xlate.pl @@ -553,9 +553,10 @@ my %globals; /\.section/ && do { my $v=undef; $line =~ s/([^,]*).*/$1/; $line = ".CRT\$XCU" if ($line eq ".init"); + $line = ".rdata" if ($line eq ".rodata"); if ($nasm) { $v="section $line"; - if ($line=~/\.([px])data/) { + if ($line=~/\.([prx])data/) { $v.=" rdata align="; $v.=$1 eq "p"? 4 : 8; } elsif ($line=~/\.CRT\$/i) { @@ -564,7 +565,7 @@ my %globals; } else { $v="$current_segment\tENDS\n" if ($current_segment); $v.="$line\tSEGMENT"; - if ($line=~/\.([px])data/) { + if ($line=~/\.([prx])data/) { $v.=" READONLY"; $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); } elsif ($line=~/\.CRT\$/i) {