CRO0: Difference between revisions

No edit summary
No edit summary
Line 15: Line 15:
|-
|-
| 0x84
| 0x84
| 0x2C
| 0x04
| ?
| Code size
|-
| 0x88
| 0x08
| Unknown
|-
| 0x90
| 0x04
| File size
|-
| 0x94
| 0x1C
| Unknown
|-
|-
| 0xB0
| 0xB0
| 0x04
| 0x04
| Section0 offset
| Code offset
|-
|-
| 0xB4
| 0xB4
| 0x04
| 0x04
| Section0 size
| Code size
|-
|-
| 0xB8
| 0xB8
| 0x04
| 0x04
| Section2 offset
| unk1 offset
|-
|-
| 0xBC
| 0xBC
| 0x04
| 0x04
| Section2 size
| unk1 size
|-
|-
| 0xC0
| 0xC0
| 0x04
| 0x04
| Section1 offset
| Module Name offset
|-
|-
| 0xC4
| 0xC4
| 0xBC
| 0xBC
| ?
| Module Name size
|-
| 0xC8
| 0x04
| unk2 offset
|-
| 0xCC
| 0x04
| unk2 size
|-
| 0xD0
| 0x04
| Export Table offset
|-
| 0xD4
| 0x04
| Export Table num (size = num * 8)
|-
| 0xD8
| 0x04
| unk3 offset
|-
| 0xDC
| 0x04
| unk3 num
|-
| 0xE0
| 0x04
| Export Strings offset
|-
| 0xE4
| 0x04
| Export Strings size
|-
| 0xE8
| 0x04
| Export Info offset
|-
| 0xEC
| 0x04
| Export Info num (size = num * 8)
|-
| 0xF0
| 0x04
| unk4 offset
|-
| 0xF4
| 0x04
| unk4 num
|-
| 0xF8
| 0x04
| unk5 offset
|-
| 0xFC
| 0x04
| unk5 num (size = num * 12)
|-
| 0x100
| 0x04
| Import Table 1 offset
|-
| 0x104
| 0x04
| Import Table 1 num (size = num * 4)
|-
| 0x108
| 0x04
| Import Table 2 offset
|-
| 0x10C
| 0x04
| Import Table 2 num (size = num * 4)
|-
| 0x110
| 0x04
| Import Table 3 offset
|-
| 0x114
| 0x04
| Import Table 3 num (size = num * 4)
|-
| 0x118
| 0x04
| Import Strings offset
|-
| 0x11C
| 0x04
| Import Strings size
|-
| 0x120
| 0x04
| unk8 offset
|-
| 0x124
| 0x04
| unk8 num
|-
| 0x128
| 0x04
| Import Info offset
|-
| 0x12C
| 0x04
| Import Info num (size = num * 12)
|-
| 0x130
| 0x04
| unk9 offset
|-
| 0x134
| 0x04
| unk9 num
|}
|}


Line 48: Line 172:
The first hash-table entry hashes the 0x100-byte header following the hash-table. The following hash-table entries hash the sections specified in the header.
The first hash-table entry hashes the 0x100-byte header following the hash-table. The following hash-table entries hash the sections specified in the header.


Section0 for CRO contains code, and CRO section1 contains symbols.
When the RO module loads the entire CRO into process memory(mapped in the 0x00100000-0x04000000 region), it modifies the mapped CRO data. The magic field is also changed to "FIXD".


When the RO module loads the entire CRO into process memory(mapped in the 0x00100000-0x04000000 region), it modifies the mapped CRO data. The magic field is also changed to "FIXD".
Upon loading, the RO module will look for symbol "__aeabi_atexit" or "nnroAeabiAtexit_".