diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-03-18 03:06:28 -0400 |
---|---|---|
committer | Anton Blanchard <anton@samba.org> | 2014-04-22 20:05:28 -0400 |
commit | d247da0a8ebcc4ebb4c766487de6af5df560adac (patch) | |
tree | 8538729d84d265a2ed9a4c2c553797c367765f9d | |
parent | 0e60e46e2aa318c92bb224de29b68b6296bb0fde (diff) |
powerpc: modules implement R_PPC64_TOCSAVE relocation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | arch/powerpc/include/uapi/asm/elf.h | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/module_64.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h index 7e39c9146a71..0341109e4395 100644 --- a/arch/powerpc/include/uapi/asm/elf.h +++ b/arch/powerpc/include/uapi/asm/elf.h | |||
@@ -291,9 +291,12 @@ do { \ | |||
291 | #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ | 291 | #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ |
292 | #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ | 292 | #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ |
293 | #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ | 293 | #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ |
294 | #define R_PPC64_TLSGD 107 | ||
295 | #define R_PPC64_TLSLD 108 | ||
296 | #define R_PPC64_TOCSAVE 109 | ||
294 | 297 | ||
295 | /* Keep this the last entry. */ | 298 | /* Keep this the last entry. */ |
296 | #define R_PPC64_NUM 107 | 299 | #define R_PPC64_NUM 110 |
297 | 300 | ||
298 | /* There's actually a third entry here, but it's unused */ | 301 | /* There's actually a third entry here, but it's unused */ |
299 | struct ppc64_opd_entry | 302 | struct ppc64_opd_entry |
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index 7c16b2eefd95..a8694d462079 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c | |||
@@ -454,6 +454,14 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
454 | *location = value - (unsigned long)location; | 454 | *location = value - (unsigned long)location; |
455 | break; | 455 | break; |
456 | 456 | ||
457 | case R_PPC64_TOCSAVE: | ||
458 | /* | ||
459 | * Marker reloc indicates we don't have to save r2. | ||
460 | * That would only save us one instruction, so ignore | ||
461 | * it. | ||
462 | */ | ||
463 | break; | ||
464 | |||
457 | default: | 465 | default: |
458 | printk("%s: Unknown ADD relocation: %lu\n", | 466 | printk("%s: Unknown ADD relocation: %lu\n", |
459 | me->name, | 467 | me->name, |