metamod-source
metamod-source copied to clipboard
x64 linux sourcehook hookmangen
Following up on @Kenzzer's epic work on the x64 Windows hookmangen #175 stuff: WIP x64 Linux hookmangen stuff!
TODO:
- More testing....
- Even more testing.....
May I recommend that you mark this PR as a draft until it is ready ? Anyways, thanks for seeing this through I've a few remarks that aren't noted in your todo.
Lots of stack alignment for Linux are missing. Specifically in
* [ ] `x64GenContext::GeneratePubFunc` * [ ] `x64GenContext::CallEndContext` * [ ] `x64GenContext::DoReturn` * [ ] `x64GenContext::PrepareReturn` * [ ] `x64GenContext::GenerateCallHooks` * [ ] `retInfo.pAssignOperator` * [ ] `retInfo.pDtor` * [ ] `x64GenContext::CallSetupHookLoop` (You also need to handle parameter 7, 8, 9 & 10)
Alignment for these were added with the latest commit:
- CallEndContext
- DoReturn
- PrepareReturn
- GenerateCallHooks
- pAssignOperator
- pDtor
TODO still because they're a bit more than just copy & pasting.
- TODO GeneratePubFunc
- TODO CallSetupHookLoop
This was going to be glue & bandaids in the short-term but I burned out. Kenzzer's work on nuking sourcehook/related in mms & sm to allow something to completely replace the systems (khook) is a better way forward.