From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Format:NSO" |
|---|
| claim | "The NSO0 flags word (offset 0xC) has eight defined bits in Atmosphere: bits 0-2 mark the text, rodata and data segment as compressed, bits 3-5 request a SHA-256 check of each decompressed segment, bit 6 is PreventCodeReads and bit 7 selects Zstandard-with-BIC instead of LZ4 compression." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:NSO" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "NsoHeader::Flag" |
|---|
| underlying_type | "u32" |
|---|
| complete | true |
|---|
| values | | 0x01 | "Flag_CompressedText" |
|---|
| 0x02 | "Flag_CompressedRo" |
|---|
| 0x04 | "Flag_CompressedRw" |
|---|
| 0x08 | "Flag_CheckHashText" |
|---|
| 0x10 | "Flag_CheckHashRo" |
|---|
| 0x20 | "Flag_CheckHashRw" |
|---|
| 0x40 | "Flag_PreventCodeReads" |
|---|
| 0x80 | "Flag_UseZbicCompression" |
|---|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "enum Flag : u32 inside struct NsoHeader lists exactly these eight values; the loader treats compressed segments as LZ4 unless Flag_UseZbicCompression is set (LoadAutoLoadModuleSegment)" |
|---|
| repo | "Atmosphere-NX/Atmosphere" |
|---|
| commit | "6b0c077b4c608a3a2ee712b8dc35fee87ceb62e8" |
|---|
| path | "libraries/libstratosphere/include/stratosphere/ldr/ldr_types.hpp" |
|---|
| lines | "96-105" |
|---|
|
| type | "source" |
|---|
| detail | "is_zbic chooses DecompressZstdWithBic, else DecompressLZ4" |
|---|
| repo | "Atmosphere-NX/Atmosphere" |
|---|
| commit | "6b0c077b4c608a3a2ee712b8dc35fee87ceb62e8" |
|---|
| path | "stratosphere/loader/source/ldr_process_creation.cpp" |
|---|
| lines | "675-681" |
|---|
|
| type | "source" |
|---|
| detail | "hactool clears flags with &= 0xF8 when writing an uncompressed NSO and tests hash bits as flags >> (segment + 3)" |
|---|
| repo | "SciresM/hactool" |
|---|
| commit | "1d64a83450e025622f3468c28fc4164dad2c5ef6" |
|---|
| path | "nso.c" |
|---|
| lines | "17,38" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "NSO header flags" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T12:50:38.367Z" |
|---|
| verifications | |
|---|