summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/crt/mips
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/crt/mips')
-rw-r--r--libc-top-half/musl/crt/mips/crti.s19
-rw-r--r--libc-top-half/musl/crt/mips/crtn.s13
2 files changed, 32 insertions, 0 deletions
diff --git a/libc-top-half/musl/crt/mips/crti.s b/libc-top-half/musl/crt/mips/crti.s
new file mode 100644
index 0000000..39dee38
--- /dev/null
+++ b/libc-top-half/musl/crt/mips/crti.s
@@ -0,0 +1,19 @@
+.set noreorder
+
+.section .init
+.global _init
+.type _init,@function
+.align 2
+_init:
+ subu $sp,$sp,32
+ sw $gp,24($sp)
+ sw $ra,28($sp)
+
+.section .fini
+.global _fini
+.type _fini,@function
+.align 2
+_fini:
+ subu $sp,$sp,32
+ sw $gp,24($sp)
+ sw $ra,28($sp)
diff --git a/libc-top-half/musl/crt/mips/crtn.s b/libc-top-half/musl/crt/mips/crtn.s
new file mode 100644
index 0000000..506a04b
--- /dev/null
+++ b/libc-top-half/musl/crt/mips/crtn.s
@@ -0,0 +1,13 @@
+.set noreorder
+
+.section .init
+ lw $gp,24($sp)
+ lw $ra,28($sp)
+ j $ra
+ addu $sp,$sp,32
+
+.section .fini
+ lw $gp,24($sp)
+ lw $ra,28($sp)
+ j $ra
+ addu $sp,$sp,32