user: implement mlibc as the libc, finally.

It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
kaguya
2026-05-02 03:31:49 -04:00
parent 2fa39ad85a
commit 9a9b91c940
2387 changed files with 152741 additions and 315 deletions
@@ -0,0 +1,10 @@
.section .text
.global _start
_start:
mov x0, sp
adr x1, main
bl __mlibc_entry
brk #0
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,9 @@
.section .text
.global _start
_start:
mov x0, sp
adrp x1, main
add x1, x1, :lo12:main
bl __mlibc_entry
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,13 @@
.section .init
.global _init
_init:
stp x29, x30, [sp, -16]!
mov x29, sp
.section .fini
.global _fini
_fini:
stp x29, x30, [sp, -16]!
mov x29, sp
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,7 @@
.section .init
ldp x29, x30, [sp], #16
.section .fini
ldp x29, x30, [sp], #16
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,9 @@
.section .text
.global __mlibc_start_thread
__mlibc_start_thread:
ldr x0, [sp], #8
ldr x1, [sp], #8
ldr x2, [sp], #8
bl __mlibc_enter_thread
.section .note.GNU-stack,"",%progbits