Files
linux-kernel-module-cheat/userland/arch/arm/hello_driver.S
Ciro Santilli 六四事件 法轮功 287c83f3f9 userland: add assembly support
Move arm assembly cheat here, and start some work on x86 cheat as well.
2019-03-22 00:00:00 +00:00

24 lines
565 B
ArmAsm

/* Minimal example using driver.
*
* Controls the exit status of the program.
*/
.syntax unified
.text
.global asm_main
asm_main:
asm_main_after_prologue:
/* Set the return value according to the ARM calling convention. */
mov r0, 0
/* Try some whacky value to see tests break. */
/*mov r0, 77*/
/* Branch to the address at register lr.
* That is the return value which was put there by the C driver (likely with a bl).
*
* X means eXchange encoding from thumb back to ARM, which is what the driver uses.
*/
bx lr