]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sparc/module: Add R_SPARC_UA64 relocation handling
authorKoakuma <koachan@protonmail.com>
Mon, 9 Jun 2025 13:53:11 +0000 (20:53 +0700)
committerAndreas Larsson <andreas@gaisler.com>
Fri, 19 Sep 2025 18:23:08 +0000 (20:23 +0200)
This is needed so that the kernel can handle R_SPARC_UA64 relocations,
which is emitted by LLVM's IAS.

Signed-off-by: Koakuma <koachan@protonmail.com>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/include/asm/elf_64.h
arch/sparc/kernel/module.c

index 8fb09eec8c3e796a9a79aa0a7877842ceb7ea6d3..694ed081cf8d99adf70be25e5dc0e30a45f70398 100644 (file)
@@ -58,6 +58,7 @@
 #define R_SPARC_7              43
 #define R_SPARC_5              44
 #define R_SPARC_6              45
+#define R_SPARC_UA64           54
 
 /* Bits present in AT_HWCAP, primarily for Sparc32.  */
 #define HWCAP_SPARC_FLUSH       0x00000001
index b8c51cc23d96944037494f13d2d65a43bb187729..6e3d4dde4f9ab33040b300c40d5fd5d0584e166d 100644 (file)
@@ -87,6 +87,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
                        break;
 #ifdef CONFIG_SPARC64
                case R_SPARC_64:
+               case R_SPARC_UA64:
                        location[0] = v >> 56;
                        location[1] = v >> 48;
                        location[2] = v >> 40;