|
|
| (2 intermediate revisions by 2 users not shown) |
| Line 171: |
Line 171: |
| | Reserved | | | Reserved |
| |} | | |} |
|
| |
| ==== KIP1 ====
| |
| {| class="wikitable" border="1"
| |
| |-
| |
| ! Offset
| |
| ! Size
| |
| ! Description
| |
| |-
| |
| | 0x0
| |
| | 0x4
| |
| | Magic "KIP1"
| |
| |-
| |
| | 0x4
| |
| | 0xC
| |
| | Name
| |
| |-
| |
| | 0x10
| |
| | 0x8
| |
| | Program ID
| |
| |-
| |
| | 0x18
| |
| | 0x4
| |
| | Version
| |
| |-
| |
| | 0x1C
| |
| | 0x1
| |
| | Main Thread Priority
| |
| |-
| |
| | 0x1D
| |
| | 0x1
| |
| | Main Thread Core Number
| |
| |-
| |
| | 0x1E
| |
| | 0x1
| |
| | Reserved
| |
| |-
| |
| | 0x1F
| |
| | 0x1
| |
| | Flags (bit0=TextCompress, bit1=RoCompress, bit2=DataCompress, bit3=Is64BitInstruction, bit4=ProcessAddressSpace64Bit, bit5=[2.0.0+] UseSecureMemory)
| |
| |-
| |
| | 0x20
| |
| | 0xC
| |
| | Text [[#Segment_Header|Segment Header]]
| |
| |-
| |
| | 0x2C
| |
| | 0x4
| |
| | Main Thread Affinity Mask
| |
| |-
| |
| | 0x30
| |
| | 0xC
| |
| | Ro [[#Segment_Header|Segment Header]]
| |
| |-
| |
| | 0x3C
| |
| | 0x4
| |
| | Main Thread Stack Size
| |
| |-
| |
| | 0x40
| |
| | 0xC
| |
| | Data [[#Segment_Header|Segment Header]]
| |
| |-
| |
| | 0x4C
| |
| | 0x4
| |
| | Reserved
| |
| |-
| |
| | 0x50
| |
| | 0xC
| |
| | Bss [[#Segment_Header|Segment Header]]
| |
| |-
| |
| | 0x5C
| |
| | 0x24
| |
| | Reserved (2 unused [[#Segment_Header|Segment Headers]])
| |
| |-
| |
| | 0x80
| |
| | 0x80
| |
| | [[NPDM#KernelCapability|Kernel Capability Data]]
| |
| |}
| |
|
| |
| ===== Segment Header =====
| |
| {| class="wikitable" border="1"
| |
| |-
| |
| ! Offset
| |
| ! Size
| |
| ! Description
| |
| |-
| |
| | 0x0
| |
| | 0x4
| |
| | Offset
| |
| |-
| |
| | 0x4
| |
| | 0x4
| |
| | Size
| |
| |-
| |
| | 0x8
| |
| | 0x4
| |
| | Compressed/Binary Size
| |
| |}
| |
|
| |
| Compressed/Binary size can be 0 or lower than expected, this is the case for BSS for example.
| |
|
| |
| ===== Compression =====
| |
| The compression used here is BLZ, with a modified footer since 3ds. The footer is now 0xC bytes instead of 0x8, and has the form u32 compressed_data_len; u32 footer_size; u32 additional_len_when_uncompressed;
| |
|
| |
|
| == Section 2 == | | == Section 2 == |