user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user