]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Do no use .cfi_negate_ra_state within the assembly on Arm64
authorTino Reichardt <milky-zfs@mcmilk.de>
Mon, 15 Apr 2024 20:56:10 +0000 (22:56 +0200)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2024 20:56:10 +0000 (13:56 -0700)
Compiling openzfs on aarch64 with gcc-8 and gcc-9 is failing currently.
See issue #14965 for deeper context.

On platforms without pointer authentication, .cfi_negate_ra_state can be
defined to a no-op:
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/aarch64-tdep.c#l1413

I have tested this on Arm64 FreeBSD 13.2 and AlmaLinux-8.

Reviewed-by: Andrew Turner <andrew.turner4@arm.com>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #14965
Closes #15784

module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S
module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S

index dc2719d142db607dbfb09c504bc0e7c171cf4ed2..e66bb4bc7f26cddea5028cc47336259073f02b1b 100644 (file)
  */
 
 #if defined(__aarch64__)
+
+/* make gcc <= 9 happy */
+#if LD_VERSION >= 233010000
+#define CFI_NEGATE_RA_STATE .cfi_negate_ra_state
+#else
+#define CFI_NEGATE_RA_STATE
+#endif
+
        .text
        .section        .note.gnu.property,"a",@note
        .p2align        3
@@ -51,7 +59,7 @@
 zfs_blake3_compress_in_place_sse2:
        .cfi_startproc
        hint    #25
-       .cfi_negate_ra_state
+       CFI_NEGATE_RA_STATE
        sub     sp, sp, #96
        stp     x29, x30, [sp, #64]
        add     x29, sp, #64
@@ -555,7 +563,7 @@ compress_pre:
 zfs_blake3_compress_xof_sse2:
        .cfi_startproc
        hint    #25
-       .cfi_negate_ra_state
+       CFI_NEGATE_RA_STATE
        sub     sp, sp, #96
        stp     x29, x30, [sp, #64]
        add     x29, sp, #64
@@ -608,7 +616,7 @@ zfs_blake3_compress_xof_sse2:
 zfs_blake3_hash_many_sse2:
        .cfi_startproc
        hint    #25
-       .cfi_negate_ra_state
+       CFI_NEGATE_RA_STATE
        stp     d15, d14, [sp, #-160]!
        stp     d13, d12, [sp, #16]
        stp     d11, d10, [sp, #32]
index c4c2dfc5bcde0fc924b067742f46c10ba7af5bd5..b9fb28dfcf037eb298d17d1ff1d4f1be6e100839 100644 (file)
  */
 
 #if defined(__aarch64__)
+
+/* make gcc <= 9 happy */
+#if LD_VERSION >= 233010000
+#define CFI_NEGATE_RA_STATE .cfi_negate_ra_state
+#else
+#define CFI_NEGATE_RA_STATE
+#endif
+
        .text
        .section        .note.gnu.property,"a",@note
        .p2align        3
@@ -51,7 +59,7 @@
 zfs_blake3_compress_in_place_sse41:
        .cfi_startproc
        hint    #25
-       .cfi_negate_ra_state
+       CFI_NEGATE_RA_STATE
        sub     sp, sp, #96
        stp     x29, x30, [sp, #64]
        add     x29, sp, #64
@@ -565,7 +573,7 @@ compress_pre:
 zfs_blake3_compress_xof_sse41:
        .cfi_startproc
        hint    #25
-       .cfi_negate_ra_state
+       CFI_NEGATE_RA_STATE
        sub     sp, sp, #96
        stp     x29, x30, [sp, #64]
        add     x29, sp, #64