Files
linux-kernel-module-cheat/baremetal/lib/arm.S
Ciro Santilli 六四事件 法轮功 fbfc4905ec baremetal: build userland programs using userland_and_baremetal instead of symlinks
Otherwise I'll go crazy with symlink action.
2019-05-23 00:00:01 +00:00

18 lines
370 B
ArmAsm

#include <lkmc.h>
.global mystart
mystart:
/* Prepare the stack for main, mandatory for C code. */
ldr sp, =stack_top
/* https://github.com/cirosantilli/linux-kernel-module-cheat#magic-failure-string */
ldr r0, =lkmc_baremetal_on_exit_callback
bl on_exit
/* Run main. */
mov r0, 0
bl main
/* If main returns, exit. */
bl exit