ruptura
ruptura copied to clipboard
Support for relocation of RIP-relative instructions in `FunctionHook`
This is quite a difficult problem to solve, but it is possible. Instructions that use RIP-relative displacements have to be rewritten to equivalent sequences using absolute addresses. The tricky part is picking a volatile scratch register to use in the rewritten code that won't conflict with the original code.
Until this problem is properly solved, we could factor the displacements used in prologue instructions into our code placement. That should be fairly simple to do.
This feature is a major undertaking, to the point that it will probably be the main theme of a major release. And that's assuming I ever get around to it...