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,16 @@
.section .text
.global _start
.type _start, %function
.type main, %function
.type __mlibc_entry, %function
_start:
suba.l %fp, %fp
move.l %sp, %d0
lea _GLOBAL_OFFSET_TABLE_@GOTPC (%pc), %a5
move.l main@GOT(%a5), -(%sp)
move.l %d0, -(%sp)
jbsr __mlibc_entry@PLTPC
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,15 @@
.section .text
.global _start
.type _start, %function
.type main, %function
.type __mlibc_entry, %function
_start:
suba.l %fp, %fp
move.l %sp, %d0
move.l #main, -(%sp)
move.l %d0, -(%sp)
jsr __mlibc_entry
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,9 @@
.section ".init"
.global _init
_init:
.section ".fini"
.globl _fini
_fini:
.section .note.GNU-stack,"",%progbits
@@ -0,0 +1,7 @@
.section .init
rts
.section .fini
rts
.section .note.GNU-stack,"",%progbits