- 论坛徽章:
- 0
|
原帖由 qtdszws 于 2007-12-17 12:02 发表 ![]()
你能否把sct.o的反汇编代码贴出来?
objdump -D sct.o
Disassembly of section .text:
00000000 <cleanup_module>:
0: 83 ec 04 sub $0x4,%esp
3: 8b 15 00 00 00 00 mov 0x0,%edx
9: a1 00 00 00 00 mov 0x0,%eax
e: 89 50 6c mov %edx,0x6c(%eax)
11: c7 04 24 00 00 00 00 movl $0x0,(%esp)
18: e8 fc ff ff ff call 19 <cleanup_module+0x19>
1d: 83 c4 04 add $0x4,%esp
20: c3 ret
21: eb 0d jmp 30 <init_module>
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
29: 90 nop
2a: 90 nop
2b: 90 nop
2c: 90 nop
2d: 90 nop
2e: 90 nop
2f: 90 nop
00000030 <init_module>:
30: 83 ec 04 sub $0x4,%esp
33: 8b 15 00 00 00 00 mov 0x0,%edx
39: 83 c2 6c add $0x6c,%edx
3c: 8b 02 mov (%edx),%eax
3e: a3 00 00 00 00 mov %eax,0x0
43: c7 02 00 00 00 00 movl $0x0,(%edx)
49: c7 04 24 19 00 00 00 movl $0x19,(%esp)
50: e8 fc ff ff ff call 51 <init_module+0x21>
55: 31 c0 xor %eax,%eax
57: 83 c4 04 add $0x4,%esp
5a: c3 ret
5b: 90 nop
5c: 8d 74 26 00 lea 0x0(%esi),%esi
00000060 <hacked_alarm>:
60: 53 push %ebx
61: 89 c3 mov %eax,%ebx
63: 83 ec 08 sub $0x8,%esp
66: 89 44 24 04 mov %eax,0x4(%esp)
6a: c7 04 24 30 00 00 00 movl $0x30,(%esp)
71: e8 fc ff ff ff call 72 <hacked_alarm+0x12>
76: 8d 04 5b lea (%ebx,%ebx,2),%eax
79: 01 c0 add %eax,%eax
7b: 83 c4 08 add $0x8,%esp
7e: 5b pop %ebx
7f: c3 ret
Disassembly of section .data:
00000000 <sys_call_table>:
0: 40 inc %eax
1: c5 2f lds (%edi),%ebp
3: c0 .byte 0xc0
Disassembly of section .bss:
00000000 <orig_alarm>:
0: 00 00 add %al,(%eax)
...
|
Disassembly of section .debug_abbrev:
Disassembly of section .debug_info:
Disassembly of section .debug_line:
Disassembly of section .rodata.str1.1:
Disassembly of section .modinfo:
Disassembly of section .debug_frame:
Disassembly of section .debug_loc:
Disassembly of section .debug_pubnames:
Disassembly of section .debug_aranges:
Disassembly of section .debug_str:
Disassembly of section .comment:
上面这几个我觉得没有什么关系,没有贴出来,如果需要,我可以补上
原帖由 petsatan 于 2007-12-17 16:03 发表
2.4.7导出了sys_call_table , 所以qtdszws 试没问题,
在2.4.18后就不导出了.
我想很可能是这个问题.
在2.4.18后的确不导出sys_call_table了,但是我们可以通过其他方式得到这个地址
我用的是grep sys_call_table System.map的方法,简单但是可移植性差
而且的确已经正确的用我们的函数替换了原有的函数,记录中可以看见
[24539.639316] You got me partner: 27!
但是参数获取却出错了 |
|