From: sashan Date: Wed, 29 Jan 2025 09:57:14 +0000 (+0100) Subject: perlasm: Replace .previous with the actual previous section X-Git-Tag: openssl-3.5.0-alpha1~655 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd6f27bdd5f6cdc577fbf1b0556ff6c45bdd5116;p=thirdparty%2Fopenssl.git perlasm: Replace .previous with the actual previous section Older versions of darwin (10.8 and earlier) don't understand .previous. this tweak emits the previous section directive which preceeds the rodata (for example .text) instead of using .previous. We use the same for mingw. Fixes #26447 Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26585) --- diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index a850df4966a..9b2f9a7e974 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -957,7 +957,9 @@ my %globals; $current_segment = ".text"; push(@segment_stack, $current_segment); } - $self->{value} = $current_segment if ($flavour eq "mingw64"); + if ($flavour eq "mingw64" || $flavour eq "macosx") { + $self->{value} = $current_segment; + } } $$line = ""; return $self;