Loader: Add ldr:ro->LoadNro()
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#define NSO_INFO_MAX (0x20)
|
||||
#define NRR_INFO_MAX (0x40)
|
||||
#define NRO_INFO_MAX (0x40)
|
||||
|
||||
class Registration {
|
||||
public:
|
||||
@@ -21,6 +22,20 @@ class Registration {
|
||||
NsoInfo info;
|
||||
};
|
||||
|
||||
struct NroInfo {
|
||||
bool in_use;
|
||||
u64 base_address;
|
||||
u64 total_mapped_size;
|
||||
u64 nro_heap_address;
|
||||
u64 nro_heap_size;
|
||||
u64 bss_heap_address;
|
||||
u64 bss_heap_size;
|
||||
u64 text_size;
|
||||
u64 ro_size;
|
||||
u64 rw_size;
|
||||
unsigned char build_id[0x20];
|
||||
};
|
||||
|
||||
struct TidSid {
|
||||
u64 title_id;
|
||||
FsStorageId storage_id;
|
||||
@@ -34,6 +49,7 @@ class Registration {
|
||||
u64 title_id_min;
|
||||
Registration::TidSid tid_sid;
|
||||
Registration::NsoInfoHolder nso_infos[NSO_INFO_MAX];
|
||||
Registration::NroInfo nro_infos[NRO_INFO_MAX];
|
||||
MappedCodeMemory nrr_infos[NRR_INFO_MAX];
|
||||
void *owner_ro_service;
|
||||
};
|
||||
@@ -55,5 +71,8 @@ class Registration {
|
||||
static void CloseRoService(void *service, Handle process_h);
|
||||
static Result AddNrrInfo(u64 index, MappedCodeMemory *nrr_info);
|
||||
static Result RemoveNrrInfo(u64 index, u64 base_address);
|
||||
static bool IsNroHashPresent(u64 index, u8 *nro_hash);
|
||||
static bool IsNroAlreadyLoaded(u64 index, u8 *build_id);
|
||||
static void AddNroToProcess(u64 index, MappedCodeMemory *nro, MappedCodeMemory *bss, u32 text_size, u32 ro_size, u32 rw_size, u8 *build_id);
|
||||
static Result GetNsoInfosForProcessId(NsoInfo *out, u32 max_out, u64 process_id, u32 *num_written);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user