summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-02-21 12:24:39 +0000
committertb <>2023-02-21 12:24:39 +0000
commitd8461c9d54c6b42b4f063da326afcf700ebcbe4f (patch)
tree59d4a8db1539baa693fbc4e3fd40dbb18cefe674
parente6c4e80b10084fa00d7af2efb6ee1b1eec39f590 (diff)
downloadopenbsd-d8461c9d54c6b42b4f063da326afcf700ebcbe4f.tar.gz
openbsd-d8461c9d54c6b42b4f063da326afcf700ebcbe4f.tar.bz2
openbsd-d8461c9d54c6b42b4f063da326afcf700ebcbe4f.zip
perlasm: properly spell .rodata for macOS on intel
ok jsing
-rwxr-xr-xsrc/lib/libcrypto/perlasm/x86_64-xlate.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl
index bc9d78eb02..642fc0090f 100755
--- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl
+++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl
@@ -504,6 +504,9 @@ my %globals;
504 $self->{value} = ".p2align\t" . (log($line)/log(2)); 504 $self->{value} = ".p2align\t" . (log($line)/log(2));
505 } elsif ($dir eq ".section") { 505 } elsif ($dir eq ".section") {
506 $current_segment=$line; 506 $current_segment=$line;
507 if (!$elf && $current_segment eq ".rodata") {
508 if ($flavour eq "macosx") { $self->{value} = ".section\t__DATA,__const"; }
509 }
507 if (!$elf && $current_segment eq ".init") { 510 if (!$elf && $current_segment eq ".init") {
508 if ($flavour eq "macosx") { $self->{value} = ".mod_init_func"; } 511 if ($flavour eq "macosx") { $self->{value} = ".mod_init_func"; }
509 elsif ($flavour eq "mingw64") { $self->{value} = ".section\t.ctors"; } 512 elsif ($flavour eq "mingw64") { $self->{value} = ".section\t.ctors"; }