Commit Graph

75 Commits

Author SHA1 Message Date
Maschell
83fb0de4c1 Fix spelling, formatting 2022-01-27 12:52:45 +01:00
Maschell
581e7fc40e Move -fno-exceptions -fno-rtti to CXXFlags 2022-01-27 12:50:37 +01:00
Maschell
575e9914f0 Minor formatting and logging cleanup 2022-01-23 22:17:48 +01:00
Maschell
883ecc3791 Move the relocator to not override the EnvrionmentLoader 2022-01-23 22:11:33 +01:00
Maschell
9f7912cb60 Support for WUMS 0.3.1 2022-01-23 22:07:38 +01:00
Maschell
7f76c9f8c8 Rewrite InitHook calling, add functions to call hooks only when a condition is true 2022-01-21 19:14:57 +01:00
Maschell
460c235430 Use std::shared_ptr 2021-12-07 18:23:18 +01:00
Maschell
862363629e WUMS 0.3 support: Store function symbol data inside global struct. Optimize relocator to only read needed data from global struct 2021-12-07 18:01:15 +01:00
Maschell
4c34943c86 Try to log via the logging module, also log to syslog via OSReport 2021-11-06 23:37:52 +01:00
Maschell
4542bc4d1a Formatting 2021-09-23 18:38:29 +02:00
Maschell
30d7e3b7bd Fix R_PPC_REL24 relocations 2021-09-18 12:01:04 +02:00
Maschell
f5c8df9416 Code cleanup 2021-09-18 11:55:01 +02:00
Maschell
74f7b8a662 Implement support for WUMS 0.2 2021-09-17 16:22:54 +02:00
Maschell
b17b522d6b Tweaking some compiler options 2021-04-17 13:25:54 +02:00
Maschell
a45d0d092d Use the latest wut version 2021-04-17 11:53:51 +02:00
Maschell
b560e1d2ba Reduce the amount for logs 2021-04-01 00:41:13 +02:00
Maschell
4eff524ab3 Code cleanup 2021-02-19 17:01:21 +01:00
Maschell
07adc02d53 Add Support for WUMS_MODULE_SKIP_WUT_INIT macro 2021-02-19 17:01:11 +01:00
Maschell
5f9e2f8725 Use a custom heap for the relocator and modules 2021-02-19 10:05:02 +01:00
Maschell
f48a375a34 Just skip modules if imports fail instead of crashing the console on purpose 2021-01-01 02:07:02 +01:00
Maschell
fddf436554 Call INIT_WUT and FINI_WUT for modules, make sure APPLICATION_ENDS and FINI_WUT hooks are actually called by a sepeate module 2021-01-01 02:06:03 +01:00
Maschell
98c8de7479 Implementation of InitBeforeRelocationDoneHook and SkipEntrypoint module options 2020-12-26 16:01:46 +01:00
Maschell
6e352b0085 Only use OSDynload_Acquire if really needed 2020-12-26 13:22:12 +01:00
Maschell
42d73fa539 relocator: UseOSDynLoad_IsModuleLoaded instead of OSDynLoad_Acquire 2020-12-26 13:18:47 +01:00
Maschell
c68e375567 Minor improvements 2020-12-01 13:06:40 +01:00
Maschell
142c4e75bb Update the Makefile 2020-07-01 13:18:27 +02:00
Maschell
d1a5a7f1c2 Update the build flags for the relocator 2020-06-25 19:11:49 +02:00
Maschell
1ed1b96bdb Move the gModuleData struct into a different location in memory, move defines into a new globals.h which both projects are using 2020-06-25 19:01:25 +02:00
Maschell
c3e7fe0f51 Add support for the WUMS_HOOK_RELOCATIONS_DONE hook 2020-06-10 16:20:20 +02:00
Maschell
00a8f16314 Do not replace the reloactions of the memory function (will be replaced by module) 2020-06-10 14:13:06 +02:00
Maschell
306b2c1e70 Improve logging 2020-06-07 15:42:47 +02:00
Maschell
de4938474c Formatting 2020-06-07 13:59:02 +02:00
Maschell
e70ec9b345 Modules do now have a flag if they should be run before their entrypoint. 2020-06-07 13:58:55 +02:00
Maschell
6a6a41bf1d Outsource the function patching to the FunctionPatcherModule and DynLoadPatchModule 2020-06-06 22:14:26 +02:00
Maschell
b46639975e Adopt the hook-call of WUMS_HOOK_INIT to provide a pointer to the module_information_t struct 2020-06-06 22:12:18 +02:00
Maschell
3f6f956b70 Move module defines into WUMS 2020-06-06 17:02:31 +02:00
Maschell
10d74d9f6d Adopt to changes of WUMS. The main() of modules are now called only once, but the WUMS_HOOK_APPLICATION_STARTS hook is called on every application start.
The .bss section is not cleared anymore, modules will always considered running in the background (and not ending when the application end)
For this to work we need to force the init of the kernel + memorymapping module to be done in the right order.
2020-06-03 19:41:05 +02:00
Maschell
62dd3cc0c5 Add support for calling hooks of a single module 2020-06-03 19:37:32 +02:00
Maschell
94d40374f9 Fix calling the hooks 2020-06-03 19:36:16 +02:00
Maschell
eac22b0583 relocator: Fix location of Init-Hook call 2020-06-01 18:43:58 +02:00
Maschell
2442bb46c5 Fix several compiler warnings 2020-06-01 16:41:46 +02:00
Maschell
985691e608 relocator: formatting 2020-06-01 16:38:13 +02:00
Maschell
29c90bc943 relocator: Fix KiIsEffectiveRangeValid to return a boolean. 2020-06-01 16:36:00 +02:00
Maschell
40359e1211 relocator: Save ordered list of modules based on dependencies, move hook calling into a new file 2020-06-01 16:35:34 +02:00
Maschell
3b94c82ed2 relocator: add missing KiPhysicalToEffectiveUncached address 2020-05-31 02:25:37 +02:00
Maschell
0225c49e3a reloactor: Add KiIsEffectiveRangeValid patch 2020-05-31 02:25:07 +02:00
Maschell
6695815a6e relocator: reduce number of warning in the logs by using our memory mapping test before the real one 2020-05-31 02:24:18 +02:00
Maschell
9809b1b48d relocator: Fix compling 2020-05-31 02:23:31 +02:00
Maschell
82dc811f42 relocator: Patch the kernel to allow usage of our custom memory mapping 2020-05-30 22:02:21 +02:00
Maschell
166ecb6bda relocator: Replace the malloc/free function of modules with the ones from the memory_mapping module (but not for the memory_mapping module itself and only after the inital setup) 2020-05-30 22:01:55 +02:00