Cort,
I think in your module the following jump gets misstreated:
90: 0800002d j b4 <init_module+ac>
90: R_MIPS_26 .text
This one is is supposed to skip over the ``printk("A");'' code after
``printk("B");'', so it's the prime suspect.
And this is how current modutils correctly compute such a R_MIPS_26
relocation in obj/obj_mips.c:
*loc = (*loc & ~0x03ffffff) | ((*loc + (v >> 2)) & 0x03ffffff);
But older modutils - including the modutils-2.1.121-12lm.src.rpm package
from oss - do this:
*loc = (*loc & ~0x03ffffff) | ((*loc & 0x03ffffff) + (v >> 2));
which is different - and wrong. This latter expression will for an
assumed load address of 0xc0000000 place 0x3800042d into *loc which
is ``xori $zero, $zero, 0x42d'', in other words a glorified nop resulting
in the printk("A") statement also getting executed.
So the fix should be either upgrading modutils or replacing above
expression in obj/obj_mips.c in your old version of modutils with the
correct one.
Ralf
|