[PATCH] powerpc/module: Add support for R_PPC64_REL32 relocations

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3552d

2 messages, 2 authors, 2016-11-14 · open the first message on its own page

[PATCH] powerpc/module: Add support for R_PPC64_REL32 relocations

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-11-03 04:39:34

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>
---
 arch/powerpc/kernel/module_64.c | 5 +++++
 1 file changed, 5 insertions(+)
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.
-- 
2.7.4

Re: powerpc/module: Add support for R_PPC64_REL32 relocations

From: Michael Ellerman <hidden>
Date: 2016-11-14 12:17:13

On Thu, 2016-03-11 at 04:39:17 UTC, Michael Ellerman wrote:
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>
Applied to powerpc next.

https://git.kernel.org/powerpc/c/9f751b82b491d06c6438066b511d44

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help