mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
start the big userland migration
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly-c-standard-library
|
||||
*/
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdint.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "lkmc.h"
|
||||
#include <lkmc.h>
|
||||
|
||||
int asm_main(uint32_t *line);
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
_start:
|
||||
asm_main_after_prologue:
|
||||
/* write */
|
||||
mov $1, %rax /* stdout */
|
||||
mov $1, %rdi /* buffer */
|
||||
mov $msg, %rsi /* len */
|
||||
mov $len, %rdx /* syscall number */
|
||||
mov $1, %rax /* syscall number */
|
||||
mov $1, %rdi /* stdout */
|
||||
mov $msg, %rsi /* buffer */
|
||||
mov $len, %rdx /* len */
|
||||
syscall
|
||||
|
||||
/* exit */
|
||||
mov $60, %rax /* exit status */
|
||||
mov $0, %rdi /* syscall number */
|
||||
mov $60, %rax /* syscall number */
|
||||
mov $0, %rdi /* exit status */
|
||||
syscall
|
||||
msg:
|
||||
.ascii "hello\n"
|
||||
|
||||
Reference in New Issue
Block a user