]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Work around to get llvm-mingw working on aarch64
authorAlexandr Nedvedicky <sashan@openssl.org>
Wed, 15 Jan 2025 15:41:33 +0000 (16:41 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 17 Jan 2025 16:43:39 +0000 (17:43 +0100)
It looks like llvm-mingw tool chain does not understand `.previous` asm
directive (see https://sourceware.org/binutils/docs/as/Previous.html).
As a workaround for win64 flavor (llvm-mingw toolchain) we let xlate
to emit .text instead of emitting .previous.

We also need to revisit usage of win64 flavor here in aarch64. We should
perhaps introduce a mingw flavour on aarch64 as well. win assembly
flavour should be used for microsoft assembler.

Fixes #26415

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26428)

crypto/perlasm/arm-xlate.pl

index aef9595a5e0b7de7cc0eb4dd023e1ca957283eb7..e07ce2c5c16643cab61274c19bf598639c962cdd 100755 (executable)
@@ -33,6 +33,15 @@ my $rodata = sub {
     SWITCH: for ($flavour) {
        /linux/         && return ".section\t.rodata";
        /ios/           && return ".section\t__TEXT,__const";
+       /win64/         && return ".section\t.rodata";
+       last;
+    }
+};
+my $previous = sub {
+    SWITCH: for ($flavour) {
+       /linux/         && return ".previous";
+       /ios/           && return ".previous";
+       /win64/         && return ".text";
        last;
     }
 };