Blame SOURCES/0001-loader-aarch64-attempt-to-avoid-text-relocations-in-.patch

c74ac0
From fb93d3ff8b63bdfdf88a8f25a715f816a52d5dd8 Mon Sep 17 00:00:00 2001
c74ac0
From: Dave Airlie <airlied@redhat.com>
c74ac0
Date: Mon, 13 Dec 2021 14:50:06 +1000
c74ac0
Subject: [PATCH] loader/aarch64: attempt to avoid text relocations in the
c74ac0
 unknown code
c74ac0
c74ac0
The commit below added a TEXTREL into the loader library, TEXTRELs
c74ac0
and security people don't get on well, so we'd like to avoid that.
c74ac0
c74ac0
This is my attempt at fixing it, I'm not an aarch64 expert at all,
c74ac0
so I'd really appreciate someone who is to take a look.
c74ac0
c74ac0
Fixes: 4f78f14c0533 ("loader: Add aarch64 unknown ext chain implementation")
c74ac0
---
c74ac0
 loader/unknown_ext_chain_gas_aarch64.S | 3 ++-
c74ac0
 1 file changed, 2 insertions(+), 1 deletion(-)
c74ac0
c74ac0
diff --git a/loader/unknown_ext_chain_gas_aarch64.S b/loader/unknown_ext_chain_gas_aarch64.S
c74ac0
index 1e065007d..a1fa46205 100644
c74ac0
--- a/loader/unknown_ext_chain_gas_aarch64.S
c74ac0
+++ b/loader/unknown_ext_chain_gas_aarch64.S
c74ac0
@@ -50,7 +50,8 @@ terminError\num:
c74ac0
     mov     x0, x11                             // Vulkan instance pointer (first arg)
c74ac0
     mov     x1, VK_DEBUG_REPORT_ERROR_BIT_EXT   // The error logging bit (second arg)
c74ac0
     mov     x2, #0                              // Zero (third arg)
c74ac0
-    ldr     x3, =termin_error_string            // The error string (fourth arg)
c74ac0
+    adrp    x9, termin_error_string
c74ac0
+    ldr     x3, [x9, #:lo12:termin_error_string]            // The error string (fourth arg)
c74ac0
     ldr     x4, [x11, x10]                      // The function name (fifth arg)
c74ac0
     bl      loader_log                          // Log the error message before we crash
c74ac0
     mov     x0, #0
c74ac0
-- 
c74ac0
2.33.1
c74ac0