kernel: Various changes
+ elf: Prevent dynamically linked programs from running on Soaplin. + sched: Support creating a process from a program_t structure. + syscall: Fix a bug where using syscall number 1024 would crash the OS. + syscall: Added a write syscall. It can only be used for writing to the standard output (FD: 1)
This commit is contained in:
parent
1e84bcedc9
commit
0652010b1c
9 changed files with 44 additions and 6 deletions
Binary file not shown.
|
@ -1,9 +1,18 @@
|
|||
bits 64
|
||||
|
||||
section .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
mov rax, 1025
|
||||
mov rax, 1 ; write syscall number
|
||||
mov rdi, 1 ; stdout file descriptor
|
||||
mov rsi, msg ; pointer to message
|
||||
mov rdx, msg_len ; message length
|
||||
syscall
|
||||
|
||||
.loop:
|
||||
jmp .loop
|
||||
jmp .loop
|
||||
|
||||
section .data
|
||||
msg db "Hello, World. Technically, this should work on both Soaplin & Linux.", 10 ; 10 is newline
|
||||
msg_len equ $ - msg
|
BIN
testing/test.o
BIN
testing/test.o
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue