mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 20:44:26 +01:00
baremetal: make entry point _start instead of lkmc_start
I forgot why I did that. Let's try and see it blow up.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
.global _start
|
||||
_start:
|
||||
mov x0, 0
|
||||
bl _exit
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <lkmc/m5ops.h>
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
.global _start
|
||||
_start:
|
||||
LKMC_M5OPS_EXIT_ASM
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
.global _start
|
||||
_start:
|
||||
/* Reset spinlock. */
|
||||
mov x0, 0
|
||||
ldr x1, =.Lspinlock
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#semihosting
|
||||
*
|
||||
* Since our stack pointer is not setup, we justa allocate a memory
|
||||
* Since our stack pointer is not setup, we just a allocate a memory
|
||||
* region to contain the semihosting arguments, which must be in memory.
|
||||
*/
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
.global _start
|
||||
_start:
|
||||
mov x1, 0x26
|
||||
movk x1, 2, lsl 16
|
||||
ldr x2, =.Lsemihost_args
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <lkmc/m5ops.h>
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
.global _start
|
||||
_start:
|
||||
wfe
|
||||
b lkmc_start
|
||||
b _start
|
||||
|
||||
Reference in New Issue
Block a user