service/ldr: Amend layout of the NRO header

The first word is just a padding byte, it's not an actual entry
instruction. Also renames the rest of the entries according to
SwitchBrew.
This commit is contained in:
Lioncash 2018-12-05 00:16:47 -05:00
parent 817fb18e30
commit 05a6f1f676
1 changed files with 3 additions and 3 deletions

View File

@ -414,13 +414,13 @@ private:
using SHA256Hash = std::array<u8, 0x20>; using SHA256Hash = std::array<u8, 0x20>;
struct NROHeader { struct NROHeader {
u32_le entrypoint_insn; INSERT_PADDING_WORDS(1);
u32_le mod_offset; u32_le mod_offset;
INSERT_PADDING_WORDS(2); INSERT_PADDING_WORDS(2);
u32_le magic; u32_le magic;
INSERT_PADDING_WORDS(1); u32_le version;
u32_le nro_size; u32_le nro_size;
INSERT_PADDING_WORDS(1); u32_le flags;
u32_le text_offset; u32_le text_offset;
u32_le text_size; u32_le text_size;
u32_le ro_offset; u32_le ro_offset;