]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: modules implement R_PPC64_TOCSAVE relocation.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 18 Mar 2014 07:06:28 +0000 (17:36 +1030)
committerAnton Blanchard <anton@samba.org>
Wed, 23 Apr 2014 00:05:28 +0000 (10:05 +1000)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
arch/powerpc/include/uapi/asm/elf.h
arch/powerpc/kernel/module_64.c

index 7e39c9146a71f63c1701118ec4a2e16a243341b5..0341109e439513b84d5ff7a3076d81fb90701719 100644 (file)
@@ -291,9 +291,12 @@ do {                                                                       \
 #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */
 #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */
 #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16        (sym+add)@dtprel@highesta */
+#define R_PPC64_TLSGD          107
+#define R_PPC64_TLSLD          108
+#define R_PPC64_TOCSAVE                109
 
 /* Keep this the last entry.  */
-#define R_PPC64_NUM            107
+#define R_PPC64_NUM            110
 
 /* There's actually a third entry here, but it's unused */
 struct ppc64_opd_entry
index 7c16b2eefd958198931146122ca5c548648ceb96..a8694d4620790551cd51fe78fda5984ff622858a 100644 (file)
@@ -454,6 +454,14 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
                        *location = value - (unsigned long)location;
                        break;
 
+               case R_PPC64_TOCSAVE:
+                       /*
+                        * Marker reloc indicates we don't have to save r2.
+                        * That would only save us one instruction, so ignore
+                        * it.
+                        */
+                       break;
+
                default:
                        printk("%s: Unknown ADD relocation: %lu\n",
                               me->name,