CRO0: Difference between revisions

No edit summary
No edit summary
Line 167: Line 167:
|}
|}


Segment Table (12 bytes)
Segment Table entry (12 bytes)
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!  Offset
!  Offset
Line 185: Line 185:
| Segment id (0, 1, 2..)
| Segment id (0, 1, 2..)
|}
|}
Import Table entry (8 bytes)
{| class="wikitable" border="1"
!  Offset
!  Size
!  Description
|-
| 0x0
| 0x4
| Name offset
|-
| 0x4
| 0x4
| Offset for symbol entry
|}
Symbol entry (12 bytes)
{| class="wikitable" border="1"
!  Offset
!  Size
!  Description
|-
| 0x0
| 0x4
| "Segment offset" for output.
|-
| 0x4
| 0x1
| Type (0=nothing/ignore, 2=38=write u32 absolute (unk+X), 3=write u32 relative (unk+X-out_ptr), 10=THUMB branch, 28=ARM32 branch, otherwise err, 29=unknown, 42=unknown)
|-
| 0x5
| 0x1
| Non-zero if last entry.
|-
| 0x6
| 0x2
| Unknown
|-
| 0x8
| 0x4
| X
|}
ARM32 branch instruction is constructed as follows:
  If X > 0x2000000 or X < 0xFE000000, then skip.
  If (X&1) == 1 then write "b 0" (infinite loop).
  Else write as normal.


Segment offset (4 bytes)
Segment offset (4 bytes)
Line 196: Line 243:
|-
|-
| 4-31
| 4-31
| Segment offset
| Offset into segment
|}
|}