[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170624013702.18225-1-mcree@orcon.net.nz>
Date: Sat, 24 Jun 2017 13:37:02 +1200
From: Michael Cree <mcree@...on.net.nz>
To: linux-kernel@...r.kernel.org
Cc: Richard Henderson <rth@...ddle.net>,
Matt Turner <mattst88@...il.com>, linux-alpha@...r.kernel.org,
Michael Cree <mcree@...on.net.nz>
Subject: [PATCH] alpha: support R_ALPHA_REFLONG relocations for module loading
Since commit 71810db27c1c853b33 (modversions: treat symbol CRCs
as 32 bit quantities) R_ALPHA_REFLONG relocations can be required
to load modules. This implements it.
Tested-by: Bob Tracy <rct@...rkin.frus.com>
Signed-off-by: Michael Cree <mcree@...on.net.nz>
---
arch/alpha/kernel/module.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index 936bc8f89a67..47632fa8c24e 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -181,6 +181,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
switch (r_type) {
case R_ALPHA_NONE:
break;
+ case R_ALPHA_REFLONG:
+ *(u32 *)location = value;
+ break;
case R_ALPHA_REFQUAD:
/* BUG() can produce misaligned relocations. */
((u32 *)location)[0] = value;
--
2.11.0
Powered by blists - more mailing lists