Files
linux-kernel-module-cheat/userland/arch/x86_64/jmp_indirect.S
Ciro Santilli 六四事件 法轮功 9dd63f6f54 x86 asm: move jmp from x86-assembly-cheat
2019-06-12 00:00:03 +00:00

23 lines
484 B
ArmAsm

/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-jmp-instruction
*
* Unconditional branch to an absolute address stored in memory on in a register.
*/
#include <lkmc.h>
LKMC_PROLOGUE
/* Address in memory. */
.section .rodata
label_address: .quad memory_label
.text
jmp *label_address
LKMC_ASSERT_FAIL
memory_label:
/* Address in register. */
lea register_label(%rip), %rax
jmp *%rax
LKMC_ASSERT_FAIL
register_label:
LKMC_EPILOGUE