/// Usually placed right after NsoHeader, but it's actual offset may vary.
/// If the 'module_name_size' member from NsoHeader is greater than 1 and the 'name_length' element from NsoModuleName is greater than 0, 'name' will hold the module name.
typedefstruct{
u8name_length;
charname[];
}NsoModuleName;
/// Placed at the very start of the decompressed .text segment.
typedefstruct{
u32entry_point;
u32mod_offset;///< NsoModHeader block offset (relative to the start of this header). Almost always set to 0x8 (the size of this struct).
}NsoModStart;
/// This is essentially a replacement for the PT_DYNAMIC program header available in ELF binaries.
/// All offsets are signed 32-bit values relative to the start of this header.
/// This is usually placed at the start of the decompressed .text segment, right after a NsoModStart block.
PartitionFileSystemContext*pfs_ctx;///< PartitionFileSystemContext for the Program NCA FS section #0, which is where this NSO is stored.
PartitionFileSystemEntry*pfs_entry;///< PartitionFileSystemEntry for this NSO in the Program NCA FS section #0. Used to read NSO data.
char*nso_filename;///< Pointer to the NSO filename in the Program NCA FS section #0.
NsoHeadernso_header;///< NSO header.
char*module_name;///< Pointer to a dynamically allocated buffer that holds the NSO module name, if available. Otherwise, this is set to NULL.
char*module_info_name;///< Pointer to a dynamically allocated buffer that holds the .rodata module info module name, if available. Otherwise, this is set to NULL.
char*rodata_api_info_section;///< Pointer to a dynamically allocated buffer that holds the .rodata API info section data, if available. Otherwise, this is set to NULL.
///< Middleware and GuidelineApi entries are retrieved from this section.
u64rodata_api_info_section_size;///< .rodata API info section size, if available. Otherwise, this is set to 0. Kept here for convenience - this is part of 'nso_header'.
char*rodata_dynstr_section;///< Pointer to a dynamically allocated buffer that holds the .rodata dynamic string section data. UnresolvedApi data is retrieved from this section.
u64rodata_dynstr_section_size;///< .rodata dynamic string section size. Kept here for convenience - this is part of 'nso_header'.
u8*rodata_dynsym_section;///< Pointer to a dynamically allocated buffer that holds the .rodata dynamic symbol section data. Used to retrieve pointers to symbol strings within dynstr.
u64rodata_dynsym_section_size;///< .rodata dynamic symbol section size. Kept here for convenience - this is part of 'nso_header'.
/// Initializes a NsoContext using a previously initialized PartitionFileSystemContext (which must belong to the ExeFS from a Program NCA) and a PartitionFileSystemEntry belonging to an underlying NSO.