From: Michael Ellerman Date: Wed, 26 Oct 2016 03:51:12 +0000 (+1100) Subject: powerpc/module: Add support for R_PPC64_REL32 relocations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f751b82b491d06c6438066b511d44fa4cc49168;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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.