linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Handle R_ALPHA_REFLONG relocation on Alpha (2.6.0-test11)
@ 2003-12-13  0:38 Nathan Poznick
  2003-12-13  2:27 ` Måns Rullgård
  2003-12-17 12:10 ` Richard Henderson
  0 siblings, 2 replies; 9+ messages in thread
From: Nathan Poznick @ 2003-12-13  0:38 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]


First off, I'm not positive that this patch is correct or not, but I'd
like to pick the brains of people in the know, to find if I'm
approaching this in the right way.

I've been unable to use modules on my Alpha with 2.6.0-test*.  modprobe
(from module-init-tools 0.9.15-pre3) would claim an invalid module
format, and the kernel would tell me "Unknown relocation: 1"  Relocation
1 on Alpha is R_ALPHA_REFLONG, and sure enough, readelf -r on one of the
modules showed many, many uses of it.  From looking at
arch/alpha/kernel/module.c, it appeared that while R_ALPHA_REFQUAD was
handled, R_ALPHA_REFLONG was not.  R_ALPHA_REFQUAD's handling looked
simple enough, so I made the change which is inlined below.

Is this the proper way to handle this?  After making this change, I've
been able to use modules without any problems.


--- linux-2.6.0-test11/arch/alpha/kernel/module.c 2003-12-12 18:19:27.000000000 -0600
+++ linux-2.6.0-test11.new/arch/alpha/kernel/module.c 2003-12-12 18:32:51.000000000 -0600
@@ -198,6 +198,9 @@
    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;



-- 
Nathan Poznick <kraken@drunkmonkey.org>

"So many times you've given me comfort and forgetfulness." --Frank
Herbert, Dune


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2003-12-30  6:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-13  0:38 [PATCH] Handle R_ALPHA_REFLONG relocation on Alpha (2.6.0-test11) Nathan Poznick
2003-12-13  2:27 ` Måns Rullgård
2003-12-13  4:09   ` Nathan Poznick
2003-12-17 12:10 ` Richard Henderson
2003-12-17 19:31   ` Nathan Poznick
2003-12-18  1:02     ` Richard Henderson
2003-12-22  1:08       ` Rusty Russell
2003-12-30  3:57       ` Rusty Russell
2003-12-30  6:14         ` Nathan Poznick

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).