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

[microblaze-uclinux] [PATCH] add load of R_MICROBLAZE_64_NONE and fix error number in module.c



I've tried to load some module, and it has failed with the error : Unknown relocation
I've investigated a bit, and I've found that the number of relocation that fails is wrong
(rela->r_info instead of rela[i].r_info).

After, this little mistake fixed, I've found that the missing relocation was R_MICROBLAZE_64_NONE. So, I've added it with the same code as R_MICROBLAZE_NONE.

Philippe

Both change are in the following patch :


Index: arch/microblaze/kernel/module.c
===================================================================
--- arch/microblaze/kernel/module.c     (révision 13)
+++ arch/microblaze/kernel/module.c     (copie de travail)
@@ -122,10 +122,14 @@
                        case R_MICROBLAZE_NONE:
                                DBPRINTK("R_MICROBLAZE_NONE\n");
                                break;
+
+                       case R_MICROBLAZE_64_NONE:
+                               DBPRINTK("R_MICROBLAZE_64_NONE\n");
+                               break;
 
                        default:
                                printk(KERN_ERR "module %s: Unknown relocation: %u\n",
-                                      module->name, ELF32_R_TYPE(rela->r_info));
+                                      module->name, ELF32_R_TYPE(rela[i].r_info));
                                return -ENOEXEC;
                }
        }




Envoyé avec Yahoo! Mail.
Une boite mail plus intelligente.