linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] alpha: support R_ALPHA_REFLONG relocations for module loading
@ 2017-06-24  1:37 Michael Cree
  2017-06-24 15:09 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Cree @ 2017-06-24  1:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Richard Henderson, Matt Turner, linux-alpha, Michael Cree

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@gherkin.frus.com>
Signed-off-by: Michael Cree <mcree@orcon.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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] alpha: support R_ALPHA_REFLONG relocations for module loading
  2017-06-24  1:37 [PATCH] alpha: support R_ALPHA_REFLONG relocations for module loading Michael Cree
@ 2017-06-24 15:09 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2017-06-24 15:09 UTC (permalink / raw)
  To: Michael Cree, linux-kernel; +Cc: Matt Turner, linux-alpha

On 06/23/2017 06:37 PM, Michael Cree wrote:
> 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@gherkin.frus.com>
> Signed-off-by: Michael Cree<mcree@orcon.net.nz>
> ---
>   arch/alpha/kernel/module.c | 3 +++
>   1 file changed, 3 insertions(+)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-24 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24  1:37 [PATCH] alpha: support R_ALPHA_REFLONG relocations for module loading Michael Cree
2017-06-24 15:09 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).