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:
move $fp, $zero
move $a0, $sp
la $a1, main
b %plt(__mlibc_entry)
break 0
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,10 @@
.section .text
.global _start
_start:
move $fp, $zero
move $a0, $sp
la $a1, main
b __mlibc_entry
break 0
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,13 @@
.section .init
.global _init
_init:
addi.d $sp, $sp, -16
st.d $ra, $sp, 8
.section .fini
.global _fini
_fini:
addi.d $sp, $sp, -16
st.d $ra, $sp, 8
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,9 @@
.section .init
ld.d $ra, $sp, 8
addi.d $sp, $sp, 16
.section .fini
ld.d $ra, $sp, 8
addi.d $sp, $sp, 16
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,12 @@
.section .text
.global __mlibc_start_thread
__mlibc_start_thread:
ld.d $a0, $sp, 0
ld.d $a1, $sp, 8
ld.d $a2, $sp, 16
addi.d $sp, $sp, 16
bstrins.d $sp, $sp, 3, 0
b __mlibc_enter_thread
break 0
.section .note.GNU-stack,"",%progbits