From 27ab21352c93b54377d9ed93aaf71847680fa75f Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 23 Feb 2023 08:49:02 +0000 Subject: 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 --- src/lib/libcrypto/perlasm/x86_64-xlate.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib') 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; /\.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) { -- cgit v1.2.3-55-g6feb