Files
linux-kernel-module-cheat/userland/arch/x86_64/jmp_indirect.S
Ciro Santilli 六四事件 法轮功 b3874cc72b asm: make all text section labels .L local
To help with backtraces if we ever fix them due to the lkmc_asm_main_after_prologue debacle.
2019-06-16 12:28:53 +01:00

23 lines
506 B
ArmAsm

/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-control-transfer-instructions
*
* 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 .Lmemory_label
.text
jmp *label_address
LKMC_ASSERT_FAIL
.Lmemory_label:
/* Address in register. */
lea .Lregister_label(%rip), %rax
jmp *%rax
LKMC_ASSERT_FAIL
.Lregister_label:
LKMC_EPILOGUE