]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
perlasm: Replace .previous with the actual previous section
authorsashan <anedvedicky@gmail.com>
Wed, 29 Jan 2025 09:57:14 +0000 (10:57 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 6 Feb 2025 16:25:15 +0000 (17:25 +0100)
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 <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26585)

crypto/perlasm/x86_64-xlate.pl

index a850df4966afedc409b3ef2c139bd65ef3a33e25..9b2f9a7e9748f59c94a71c248fb83461c203112f 100755 (executable)
@@ -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;