summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/module_64.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-10-26 05:51:12 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-11-14 01:11:51 +0100
commit9f751b82b491d06c6438066b511d44fa4cc49168 (patch)
tree32ec77c02b39b1448cf3f30629b8b420855b8c0a /arch/powerpc/kernel/module_64.c
parentpowerpc/asm: Allow including ppc_asm.h in asm files (diff)
downloadlinux-9f751b82b491d06c6438066b511d44fa4cc49168.tar.xz
linux-9f751b82b491d06c6438066b511d44fa4cc49168.zip
powerpc/module: Add support for R_PPC64_REL32 relocations
We haven't seen these before, but the soon to be merged relative exception tables support causes them to be generated. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/module_64.c')
-rw-r--r--arch/powerpc/kernel/module_64.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 183368e008cf..bb1807184bad 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -652,6 +652,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
*location = value - (unsigned long)location;
break;
+ case R_PPC64_REL32:
+ /* 32 bits relative (used by relative exception tables) */
+ *(u32 *)location = value - (unsigned long)location;
+ break;
+
case R_PPC64_TOCSAVE:
/*
* Marker reloc indicates we don't have to save r2.