From: tb Date: Tue, 21 Feb 2023 12:24:39 +0000 (+0000) Subject: perlasm: properly spell .rodata for macOS on intel X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2a1fd0dfb774b05c221e116a6257741830e6a210;p=openbsd perlasm: properly spell .rodata for macOS on intel ok jsing --- 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"; }