| View previous topic :: View next topic |
| Author |
Message |
ab5000
Joined: 06 May 2008 Posts: 74
|
Posted: Wed Sep 10, 2008 7:23 pm Post subject: 3.52 systimer.prx and prxtool |
|
|
hi.
when i disassemble 3.52 systimer.prx with prxtool (built yesterday from svn) I don't got sceSTimerAlloc! Also, the .text section doesn't start with module_start or a function, but with pure mips code! in this module (and also in other modules) there is a strange function, which simply returns. the strange fact is that those functions contain data (also ascii strings) interpreted as MIPS assembly! like this:
| Code: | 0x00000A3C: 0x00000A08 '....' - Unknown
0x00000A40: 0x00000000 '....' - nop
0x00000A44: 0x65746E49 'Inte' - Unknown
0x00000A48: 0x70757272 'rrup' - Unknown
0x00000A4C: 0x6E614D74 'tMan' - Unknown
0x00000A50: 0x72656761 'ager' - Unknown
0x00000A54: 0x4B726F46 'ForK' - Unknown
0x00000A58: 0x656E7265 'erne' - Unknown
0x00000A5C: 0x0000006C 'l...' - Unknown
0x00000A60: 0x00000000 '....' - nop
0x00000A64: 0x53656373 'sceS' - beql $k1, $a1, loc_00019834
0x00000A68: 0x65707375 'uspe' - Unknown
0x00000A6C: 0x6F46646E 'ndFo' - vsge.s S323, S103, S122
0x00000A70: 0x72654B72 'rKer' - Unknown
0x00000A74: 0x006C656E 'nel.' - Unknown
0x00000A78: 0xD3744BE0 '.Kt.' - Unknown
0x00000A7C: 0x2F064FA6 '.O./' - sltiu $a2, $t8, 20390
0x00000A80: 0xF01D73A7 '.s..' - vmmul.p E103, M432, M710
0x00000A84: 0x11B97506 '.u..' - beq $t5, $t9, loc_0001DEA0 |
can someone explain this to me?
thanks in advance. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Sep 11, 2008 5:53 am Post subject: |
|
|
Most assembly code has embedded data of some sort in it. The smarter the disassembly program, the better it is at finding embedded data and NOT showing it as code. Prxtool is pretty simple, and just shows all the data as hex, ascii, and code, leaving you to sort out the real code from the data.
Disassembling code is more than running a tool and getting perfect code back. This is were you as the programmer use that thing called a brain to figure out what is going on. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Thu Sep 11, 2008 6:10 am Post subject: |
|
|
prxtool wont display everything as disasm and hex. It only disassembles (unless you force it) the .text sections. Seems that prx has the module info/imports rammed into the .text section which is what causes the data to be disassembled.
As for missing sceSTimerAlloc, that is probably a bug in the annotation code. I probably never say an exported function at address 0 (it is the start of the code) so never saw the bug :) I doubt I can be arsed to fit it tbh :P |
|
| Back to top |
|
 |
ab5000
Joined: 06 May 2008 Posts: 74
|
Posted: Thu Sep 11, 2008 7:00 pm Post subject: |
|
|
| TyRaNiD wrote: | prxtool wont display everything as disasm and hex. It only disassembles (unless you force it) the .text sections. Seems that prx has the module info/imports rammed into the .text section which is what causes the data to be disassembled.
As for missing sceSTimerAlloc, that is probably a bug in the annotation code. I probably never say an exported function at address 0 (it is the start of the code) so never saw the bug :) I doubt I can be arsed to fit it tbh :P |
so, the pure mips code before the first exported funtion is the code of sceSTimerAlloc? |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Fri Sep 12, 2008 4:43 am Post subject: |
|
|
| yah, if you do prxtool -f systimer.prx then the addresses of the functions is in the [], the alloc function is at address 0. |
|
| Back to top |
|
 |
ab5000
Joined: 06 May 2008 Posts: 74
|
Posted: Fri Sep 12, 2008 6:10 pm Post subject: |
|
|
| TyRaNiD wrote: | | yah, if you do prxtool -f systimer.prx then the addresses of the functions is in the [], the alloc function is at address 0. |
ok, perfect. thanks a lot! |
|
| Back to top |
|
 |
|