Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
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
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
Maschell
ce14fc8a6e relocator: Make sure to call the memory_mapping main() function at first 2020-05-30 22:00:17 +02:00
Maschell
8d46cf5303 relocator: Save the address of the PhysicalToEffective + EffectiveToPhysical function from the memory module is present. 2020-05-30 21:59:42 +02:00
Maschell
a3310579b8 Call module init hooks 2020-05-29 19:27:30 +02:00
Maschell
28926f6a9b Fix flushing the cache are doing the relocations 2020-05-29 18:26:19 +02:00
Maschell
fa68c980af Fix support for loading multiple modules 2020-05-28 21:45:44 +02:00
Maschell
b9064883a2 OSFatal on failed find export 2020-05-28 20:26:02 +02:00
Maschell
2ee3011ae8 Formatting 2020-05-17 19:05:51 +02:00
Maschell
373579cd6f Inital support for patching the OSDynload_Acquire and OSDynload_FindExport 2020-05-17 13:14:19 +02:00
Maschell
b526acbded Allocate everything on the stack instead of the heap 2020-05-17 13:11:52 +02:00
Maschell
ebf09003d3 [relocator] Re-use the header from the SetupPayload and move some files into /utils 2020-04-29 12:35:13 +02:00
Maschell
7fe051d2cf Added some logging 2020-04-29 12:06:47 +02:00
Maschell
7b8a421d7a Remove the ../source entry from the Makefile of the relocator 2020-04-29 12:05:39 +02:00
Maschell
06cb0efe34 Fix the address of the module_information_t struct 2020-04-29 11:43:45 +02:00
Maschell
9a4068d15b first commit 2020-04-28 14:43:07 +02:00