From 2a1fd0dfb774b05c221e116a6257741830e6a210 Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 21 Feb 2023 12:24:39 +0000 Subject: [PATCH] perlasm: properly spell .rodata for macOS on intel ok jsing --- lib/libcrypto/perlasm/x86_64-xlate.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libcrypto/perlasm/x86_64-xlate.pl b/lib/libcrypto/perlasm/x86_64-xlate.pl index bc9d78eb02b..642fc0090ff 100755 --- a/lib/libcrypto/perlasm/x86_64-xlate.pl +++ b/lib/libcrypto/perlasm/x86_64-xlate.pl @@ -504,6 +504,9 @@ my %globals; $self->{value} = ".p2align\t" . (log($line)/log(2)); } elsif ($dir eq ".section") { $current_segment=$line; + if (!$elf && $current_segment eq ".rodata") { + if ($flavour eq "macosx") { $self->{value} = ".section\t__DATA,__const"; } + } if (!$elf && $current_segment eq ".init") { if ($flavour eq "macosx") { $self->{value} = ".mod_init_func"; } elsif ($flavour eq "mingw64") { $self->{value} = ".section\t.ctors"; } -- 2.20.1