Validation and limits

Both loaders require a complete header, a text segment starting at zero that contains the header, and contiguous text, read-only and data segments covering the declared image. Calculations use 64-bit values so 32-bit header fields cannot wrap bounds checks. Compressed NROs are rejected explicitly rather than interpreted as raw instructions.

The runtime checks that the build ID, segment layout and BSS size match the recompiled descriptor. It copies only the declared image, not trailing assets, and zeroes BSS and mapping padding. An NRO descriptor selects exefs/main.nro or main.nro, so an old NSO named main cannot shadow it. As with the existing NSO check, the build ID is not a cryptographic comparison of every instruction.

Unlike Atmosphère's on-device registration service, ScarletNX retains support for byte-packed synthetic fixtures rather than requiring page-aligned section sizes. The standalone NRO workflow does not implement NRR authorization, compressed NRO decompression or a new homebrew-loader startup ABI. Dynamic loading through the emulated ldr:ro service is described below. It is separate from this workflow. Existing ASET parsing is unchanged. Restaging an NRO without embedded RomFS removes the generated romfs.bin from the previous image, without touching saves.


Made from docs/platforms/nx/nro.md at 69237645142c. GPL-3.0-or-later.