Skip to contentSkip to conversation

loongarch64: Use la.pcrel instead of la.

PATCH New Vladimir Serbinenko 1 participant 1 message Apr 5, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 loongarch64: Use la.pcrel instead of la.

la.pcrel unlike la should work even above 4GiB mark.

---
 grub-core/kern/loongarch64/efi/startup.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
grub-core/kern/loongarch64/efi/startup.S +2 -2
index 87cfb23ea..a6476b360 100644
@@ -26,9 +26,9 @@ FUNCTION(_start)
 	 * EFI_SYSTEM_TABLE and EFI_HANDLE are passed in $a1/$a0.
 	 */
 
-	la 		$a2, EXT_C(grub_efi_image_handle)
+	la.pcrel	$a2, EXT_C(grub_efi_image_handle)
 	st.d		$a0, $a2, 0
-	la		$a2, EXT_C(grub_efi_system_table)
+	la.pcrel	$a2, EXT_C(grub_efi_system_table)
 	st.d		$a1, $a2, 0
 
 	b		EXT_C(grub_main)
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel