mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 09:45:58 +01:00
Remove useless rax preserve across callq
This commit is contained in:
parent
03d7651916
commit
18229043fa
1 changed files with 2 additions and 4 deletions
|
@ -82,15 +82,13 @@ bool CFunctionHook::hook() {
|
||||||
// nop
|
// nop
|
||||||
static constexpr uint8_t NOP = 0x90;
|
static constexpr uint8_t NOP = 0x90;
|
||||||
/*
|
/*
|
||||||
pushq %rax
|
|
||||||
movabs $0,%rax
|
movabs $0,%rax
|
||||||
callq *%rax
|
callq *%rax
|
||||||
popq %rax
|
|
||||||
|
|
||||||
offset for addr: 3
|
offset for addr: 3
|
||||||
*/
|
*/
|
||||||
static constexpr uint8_t CALL_WITH_RAX[] = {0x50, 0x48, 0xB8, 0xEF, 0xBE, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x58};
|
static constexpr uint8_t CALL_WITH_RAX[] = {0x48, 0xB8, 0xEF, 0xBE, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x10};
|
||||||
static constexpr size_t CALL_WITH_RAX_ADDRESS_OFFSET = 3;
|
static constexpr size_t CALL_WITH_RAX_ADDRESS_OFFSET = 2;
|
||||||
|
|
||||||
// get minimum size to overwrite
|
// get minimum size to overwrite
|
||||||
const auto HOOKSIZE = probeMinimumJumpSize(m_pSource, sizeof(ABSOLUTE_JMP_ADDRESS) + sizeof(PUSH_RAX) + sizeof(POP_RAX));
|
const auto HOOKSIZE = probeMinimumJumpSize(m_pSource, sizeof(ABSOLUTE_JMP_ADDRESS) + sizeof(PUSH_RAX) + sizeof(POP_RAX));
|
||||||
|
|
Loading…
Reference in a new issue