mirror of
https://github.com/wiiu-env/AromaBaseModule.git
synced 2024-11-16 00:45:07 +01:00
Rename gRPLData to gLoadedRPLData
This commit is contained in:
parent
74d1c74b94
commit
769262a66c
@ -5,10 +5,10 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
void initDynload() {
|
void initDynload() {
|
||||||
gRPLData = (LOADED_RPL *) malloc(sizeof(LOADED_RPL) * gModuleData->number_modules);
|
gLoadedRPLData = (LOADED_RPL *) malloc(sizeof(LOADED_RPL) * gModuleData->number_modules);
|
||||||
if (!gRPLData) {
|
if (!gLoadedRPLData) {
|
||||||
DEBUG_FUNCTION_LINE_ERR("Failed to allocate gRPLData");
|
DEBUG_FUNCTION_LINE_ERR("Failed to allocate gLoadedRPLData");
|
||||||
OSFatal("AromaBaseModule: Failed to allocate gRPLData");
|
OSFatal("AromaBaseModule: Failed to allocate gLoadedRPLData");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE("Patch functions for dynload patches");
|
DEBUG_FUNCTION_LINE("Patch functions for dynload patches");
|
||||||
|
@ -64,14 +64,14 @@ DECL_FUNCTION(LOADED_RPL *, LiFindRPLByName, char *name) {
|
|||||||
auto *curModule = &gModuleData->modules[i];
|
auto *curModule = &gModuleData->modules[i];
|
||||||
if (strcmp(name, curModule->module_export_name) == 0) {
|
if (strcmp(name, curModule->module_export_name) == 0) {
|
||||||
fileInfoBuffer.tlsModuleIndex = 0;
|
fileInfoBuffer.tlsModuleIndex = 0;
|
||||||
gRPLData[i].fileInfoBuffer = &fileInfoBuffer; // will be copied to the LiImportTracking array
|
gLoadedRPLData[i].fileInfoBuffer = &fileInfoBuffer; // will be copied to the LiImportTracking array
|
||||||
gRPLData[i].loadStateFlags = 0x0;
|
gLoadedRPLData[i].loadStateFlags = 0x0;
|
||||||
gRPLData[i].entrypoint = 0x1; //needs to be != 0;
|
gLoadedRPLData[i].entrypoint = 0x1; //needs to be != 0;
|
||||||
gRPLData[i].funcExports = (Export *) (FUNCTION_EXPORT_MAGIC + i);
|
gLoadedRPLData[i].funcExports = (Export *) (FUNCTION_EXPORT_MAGIC + i);
|
||||||
gRPLData[i].numFuncExports = 1;
|
gLoadedRPLData[i].numFuncExports = 1;
|
||||||
gRPLData[i].dataExports = (Export *) (DATA_EXPORT_MAGIC + i);
|
gLoadedRPLData[i].dataExports = (Export *) (DATA_EXPORT_MAGIC + i);
|
||||||
gRPLData[i].numDataExports = 1;
|
gLoadedRPLData[i].numDataExports = 1;
|
||||||
return &gRPLData[i];
|
return &gLoadedRPLData[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return real_LiFindRPLByName(name);
|
return real_LiFindRPLByName(name);
|
||||||
@ -118,7 +118,7 @@ DECL_FUNCTION(Export *, LiBinSearchExport, Export *exports, int numExports, char
|
|||||||
|
|
||||||
DECL_FUNCTION(int32_t, LiFixupRelocOneRPL, LOADED_RPL *rpl, void *imports, uint32_t unknown) {
|
DECL_FUNCTION(int32_t, LiFixupRelocOneRPL, LOADED_RPL *rpl, void *imports, uint32_t unknown) {
|
||||||
auto rplAddress = (uint32_t) rpl;
|
auto rplAddress = (uint32_t) rpl;
|
||||||
if (rplAddress >= (uint32_t) &gRPLData[0] && rplAddress < (uint32_t) &gRPLData[gModuleData->number_modules]) {
|
if (rplAddress >= (uint32_t) &gLoadedRPLData[0] && rplAddress < (uint32_t) &gLoadedRPLData[gModuleData->number_modules]) {
|
||||||
// Skip if this is our fake RPL
|
// Skip if this is our fake RPL
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ DECL_FUNCTION(int32_t, LiFixupRelocOneRPL, LOADED_RPL *rpl, void *imports, uint3
|
|||||||
|
|
||||||
DECL_FUNCTION(int32_t, sCheckOne, LOADED_RPL *rpl) {
|
DECL_FUNCTION(int32_t, sCheckOne, LOADED_RPL *rpl) {
|
||||||
auto rplAddress = (uint32_t) rpl;
|
auto rplAddress = (uint32_t) rpl;
|
||||||
if (rplAddress >= (uint32_t) &gRPLData[0] && rplAddress < (uint32_t) &gRPLData[gModuleData->number_modules]) {
|
if (rplAddress >= (uint32_t) &gLoadedRPLData[0] && rplAddress < (uint32_t) &gLoadedRPLData[gModuleData->number_modules]) {
|
||||||
// Skip if this is our fake RPL
|
// Skip if this is our fake RPL
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
module_information_t *gModuleData __attribute__((section(".data"))) = NULL;
|
module_information_t *gModuleData __attribute__((section(".data"))) = NULL;
|
||||||
int32_t gSDMountRefCount __attribute__((section(".data"))) = 0;
|
int32_t gSDMountRefCount __attribute__((section(".data"))) = 0;
|
||||||
LOADED_RPL *gRPLData __attribute__((section(".data"))) = nullptr;
|
LOADED_RPL *gLoadedRPLData __attribute__((section(".data"))) = nullptr;
|
@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
extern module_information_t *gModuleData;
|
extern module_information_t *gModuleData;
|
||||||
extern int32_t gSDMountRefCount;
|
extern int32_t gSDMountRefCount;
|
||||||
extern LOADED_RPL *gRPLData;
|
extern LOADED_RPL *gLoadedRPLData;
|
Loading…
Reference in New Issue
Block a user