[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36



On Fri, Jan 14, 2011 at 11:38:28AM -0800, David Miller wrote:
> From: Richard Mortimer <richm@oldelvet.org.uk>
> > So that means that the kernel is complaining about type 54 which is
> > R_SPARC_UA64. That matches with the objdump output which doesn't list
> > R_SPARC_LM22 for scsi_mod.ko
> 
> Indeed, good catch :-)
> That makes things different, I'll look into this, thanks.

If I see this correctly, then _UA64 is the same then _64 except for the
alignment requirements; similar to _UA32 and _32. So this should be
fixed by the following patch.

diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c
index ee3c7dd..4d55a43 100644
--- a/arch/sparc/kernel/module.c
+++ b/arch/sparc/kernel/module.c
@@ -157,6 +157,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
 		switch (ELF_R_TYPE(rel[i].r_info) & 0xff) {
 #ifdef CONFIG_SPARC64
 		case R_SPARC_64:
+		case R_SPARC_UA64:
 			location[0] = v >> 56;
 			location[1] = v >> 48;
 			location[2] = v >> 40;
-- 
Spock: We suffered 23 casualties in that attack, Captain.



Reply to: