jobcore/btrfs-progs/839b2d587da9d691c2f2e7cdb5301eed23781d1d.patch
2023-09-13 18:54:19 +03:00

39 lines
1.4 KiB
Diff

From 839b2d587da9d691c2f2e7cdb5301eed23781d1d Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Tue, 5 Sep 2023 10:37:09 -0700
Subject: [PATCH] btrfs-progs: crypto: fix readonly relocation of the jumptable
Without this, the btrfs programs fail to link when build with -Wl,-z,relro,
due to the jumptable containing relocations.
Pull-request: #675
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Signed-off-by: David Sterba <dsterba@suse.com>
---
crypto/crc32c-pcl-intel-asm_64.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/crc32c-pcl-intel-asm_64.S b/crypto/crc32c-pcl-intel-asm_64.S
index 102566e51..5fab0e09f 100644
--- a/crypto/crc32c-pcl-intel-asm_64.S
+++ b/crypto/crc32c-pcl-intel-asm_64.S
@@ -321,10 +321,10 @@ LABEL less_than_ %j # less_than_j: Length should be in
.size crc_pcl, .-crc_pcl
###SYM_FUNC_END(crc_pcl)
-.section .rodata, "a", @progbits
################################################################
## jump table Table is 129 entries x 2 bytes each
################################################################
+.data
.align 4
jump_table:
i=0
@@ -340,6 +340,7 @@ JMPTBL_ENTRY %i
## PCLMULQDQ tables
## Table is 128 entries x 2 words (8 bytes) each
################################################################
+.section .rodata, "a", @progbits
.align 8
K_table:
.long 0x493c7d27, 0x00000001