[PATCH] src/isa-l/erasure_code: Fix text relocation on aarch64
authorluo rixin <luorixin@huawei.com>
Fri, 8 Jan 2021 08:16:02 +0000 (16:16 +0800)
committerThomas Goirand <zigo@debian.org>
Mon, 9 Jan 2023 10:41:27 +0000 (10:41 +0000)
Here is the bug report on ceph. https://tracker.ceph.com/issues/48681

Signed-off-by: luo rixin <luorixin@huawei.com>
Gbp-Pq: Name bug1917414.patch

src/isa-l/erasure_code/aarch64/gf_2vect_mad_neon.S
src/isa-l/erasure_code/aarch64/gf_3vect_mad_neon.S
src/isa-l/erasure_code/aarch64/gf_4vect_mad_neon.S
src/isa-l/erasure_code/aarch64/gf_5vect_mad_neon.S
src/isa-l/erasure_code/aarch64/gf_6vect_mad_neon.S
src/isa-l/erasure_code/aarch64/gf_vect_mad_neon.S

index 92c19f549cf32a20f7c2e54737824ab11c38d3c8..b8a8cadc6a044fdaab23a79f26763576165b6034 100644 (file)
@@ -360,7 +360,8 @@ gf_2vect_mad_neon:
        sub     x_dest1, x_dest1, x_tmp
        sub     x_dest2, x_dest2, x_tmp
 
-       ldr     x_const, =const_tbl
+       adrp    x_const, const_tbl
+       add     x_const, x_const, :lo12:const_tbl
        sub     x_const, x_const, x_tmp
        ldr     q_tmp, [x_const, #16]
 
@@ -394,7 +395,7 @@ gf_2vect_mad_neon:
        mov     w_ret, #1
        ret
 
-.section .data
+.section .rodata
 .balign 8
 const_tbl:
        .dword 0x0000000000000000, 0x0000000000000000
index 4a041e053e4bd3822c9b782a5edc6773cc5b2665..d9a3cccc4978a543776fe460441d031b296ead9a 100644 (file)
@@ -332,7 +332,8 @@ gf_3vect_mad_neon:
        sub     x_dest2, x_dest2, x_tmp
        sub     x_dest3, x_dest3, x_tmp
 
-       ldr     x_const, =const_tbl
+       adrp    x_const, const_tbl
+       add     x_const, x_const, :lo12:const_tbl
        sub     x_const, x_const, x_tmp
        ldr     q_tmp, [x_const, #16]
 
@@ -374,7 +375,7 @@ gf_3vect_mad_neon:
        mov     w_ret, #1
        ret
 
-.section .data
+.section .rodata
 .balign 8
 const_tbl:
        .dword 0x0000000000000000, 0x0000000000000000
index d56cece4cfc6056997fe358d3fcad4981d6ebcce..86924370241ceb8fe19bd243c18b391327efe4e0 100644 (file)
@@ -397,7 +397,8 @@ gf_4vect_mad_neon:
        sub     x_dest3, x_dest3, x_tmp
        sub     x_dest4, x_dest4, x_tmp
 
-       ldr     x_const, =const_tbl
+       adrp    x_const, const_tbl
+       add     x_const, x_const, :lo12:const_tbl
        sub     x_const, x_const, x_tmp
        ldr     q_tmp, [x_const, #16]
 
@@ -448,7 +449,7 @@ gf_4vect_mad_neon:
        mov     w_ret, #1
        ret
 
-.section .data
+.section .rodata
 .balign 8
 const_tbl:
        .dword 0x0000000000000000, 0x0000000000000000
index 5cbc6bf92e6574c26a816f49a91643ed19d5b2b8..f0ff163feff13ff1eb9b54054d8394022109dc89 100644 (file)
@@ -463,7 +463,8 @@ gf_5vect_mad_neon:
        sub     x_dest4, x_dest4, x_tmp
        sub     x_dest5, x_dest5, x_tmp
 
-       ldr     x_const, =const_tbl
+       adrp    x_const, const_tbl
+       add     x_const, x_const, :lo12:const_tbl
        sub     x_const, x_const, x_tmp
        ldr     q_tmp, [x_const, #16]
 
@@ -527,7 +528,7 @@ gf_5vect_mad_neon:
        mov     w_ret, #1
        ret
 
-.section .data
+.section .rodata
 .balign 8
 const_tbl:
        .dword 0x0000000000000000, 0x0000000000000000
index 4886440ba82087de4edd2f0aa9f4219c95ca48e8..7ec2d80b6dc4f8165350fbdc7d7771c372bd54c7 100644 (file)
@@ -526,7 +526,8 @@ gf_6vect_mad_neon:
        sub     x_dest5, x_dest5, x_tmp
        sub     x_dest6, x_dest6, x_tmp
 
-       ldr     x_const, =const_tbl
+       adrp    x_const, const_tbl
+       add     x_const, x_const, :lo12:const_tbl
        sub     x_const, x_const, x_tmp
        ldr     q_tmp, [x_const, #16]
 
@@ -602,7 +603,7 @@ gf_6vect_mad_neon:
        mov     w_ret, #1
        ret
 
-.section .data
+.section .rodata
 .balign 8
 const_tbl:
        .dword 0x0000000000000000, 0x0000000000000000
index 0e25a51e8deb4157d0171576fd596543b2dc0237..9ebd86b4a89dee188e797e2a03191a7e2c5bdade 100644 (file)
@@ -281,7 +281,8 @@ gf_vect_mad_neon:
        mov     x_src, x_src_end
        sub     x_dest1, x_dest1, x_tmp
 
-       ldr     x_const, =const_tbl
+       adrp    x_const, const_tbl
+       add     x_const, x_const, :lo12:const_tbl
        sub     x_const, x_const, x_tmp
        ldr     q_tmp, [x_const, #16]
 
@@ -307,7 +308,7 @@ gf_vect_mad_neon:
        mov     w_ret, #1
        ret
 
-.section .data
+.section .rodata
 .balign 8
 const_tbl:
        .dword 0x0000000000000000, 0x0000000000000000