Hi Scott,
I took the objdump of module to figure out the failure but could not get where negative size is coming. Below is the code and objdump snippet,
/* code for module insertion =====>
int __init
init_module(void)
{
int rc;
printk("chanmish[%s,%d]!!!!\n", __FUNCTION__,__LINE__);
printk("chanmish[%s,%d] %p\n", __FUNCTION__,__LINE__,gmodule_get);
/* Get our definition */
_gmodule = gmodule_get();
if(!_gmodule) return -ENODEV;
/* objdump for above section =====>
0000000000000000 <.init_module>:
0: 7c 08 02 a6 mflr r0
4: fb e1 ff f8 std r31,-8(r1)
8: 3f e2 00 00 addis r31,r2,0
c: f8 01 00 10 std r0,16(r1)
10: fb 81 ff e0 std r28,-32(r1)
14: 3b ff 00 00 addi r31,r31,0
18: fb a1 ff e8 std r29,-24(r1)
1c: 3f 82 00 40 addis r28,r2,64
20: fb c1 ff f0 std r30,-16(r1)
24: 3b ff 00 30 addi r31,r31,48
28: f8 21 ff 71 stdu r1,-144(r1)
2c: 3b 9c 00 40 addi r28,r28,64
30: 7f e4 fb 78 mr r4,r31
34: 38 a0 01 8f li r5,399
38: 7f 83 e3 78 mr r3,r28
3c: 3f a2 00 00 addis r29,r2,0
40: 48 00 00 01 bl 40 <.init_module+0x40>
44: 60 00 00 00 nop
48: 3d 22 00 00 addis r9,r2,0
4c: e8 c9 00 00 ld r6,0(r9)
50: 3c 62 00 58 addis r3,r2,88
54: 7f e4 fb 78 mr r4,r31
58: 38 a0 01 90 li r5,400
5c: 38 63 00 58 addi r3,r3,88
60: 3b bd 00 00 addi r29,r29,0
64: 48 00 00 01 bl 64 <.init_module+0x64>
68: 60 00 00 00 nop
6c: 3b c0 ff ed li r30,-19
70: 48 00 00 01 bl 70 <.init_module+0x70>
74: 60 00 00 00 nop
78: 2f a3 00 00 cmpdi cr7,r3,0
7c: f8 7d 00 08 std r3,8(r29)
80: 41 fe 01 10 beq+ cr7,190 <.init_module+0x190>
84: 7f e4 fb 78 mr r4,r31
88: 38 a0 01 95 li r5,405
8c: 7f 83 e3 78 mr r3,r28
90: 48 00 00 01 bl 90 <.init_module+0x90>
/* code for gmodule_get =====>
gmodule_t *
gmodule_get(void)
{
printk(KERN_ERR "chanmish[%s,%d]\n",__FUNCTION__,__LINE__);
_gmodule.name = _modname;
return &_gmodule;
}
/* objdump for above section =====>
0000000000004880 <.gmodule_get>:
4880: 7c 08 02 a6 mflr r0
4884: 3c 82 00 00 addis r4,r2,0
4888: f8 01 00 10 std r0,16(r1)
488c: 38 84 00 00 addi r4,r4,0
4890: f8 21 ff 91 stdu r1,-112(r1)
4894: 3c 62 09 60 addis r3,r2,2400
4898: 38 84 00 20 addi r4,r4,32
489c: 38 a0 0e ad li r5,3757
48a0: 38 63 09 60 addi r3,r3,2400
48a4: 48 00 00 01 bl 48a4 <.gmodule_get+0x24>
48a8: 60 00 00 00 nop
48ac: 38 21 00 70 addi r1,r1,112
48b0: e8 01 00 10 ld r0,16(r1)
48b4: 3c 62 00 00 addis r3,r2,0
48b8: 38 63 00 00 addi r3,r3,0
48bc: 38 63 01 e8 addi r3,r3,488
48c0: 7c 08 03 a6 mtlr r0
48c4: 4e 80 00 20 blr
48c8: 00 00 00 00 .long 0x0
48cc: 00 00 00 01 .long 0x1
48d0: 80 00 00 00 lwz r0,0(0)
48d4: 60 00 00 00 nop
48d8: 60 00 00 00 nop
48dc: 60 00 00 00 nop
Please suggest what else I should try to resolve this issue.
Regards,
Chandra Shekhar