From 2536c3e3692e9fc25715e79a926bbf9ef643540b Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 23 Feb 2023 08:49:02 +0000 Subject: [PATCH] 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 --- lib/libcrypto/perlasm/x86_64-xlate.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) { -- 2.20.1