diff options
Diffstat (limited to 'crt/sh')
-rw-r--r-- | crt/sh/crti.s | 21 | ||||
-rw-r--r-- | crt/sh/crtn.s | 13 |
2 files changed, 34 insertions, 0 deletions
diff --git a/crt/sh/crti.s b/crt/sh/crti.s new file mode 100644 index 0000000..d99bfd5 --- /dev/null +++ b/crt/sh/crti.s @@ -0,0 +1,21 @@ +.section .init +.global _init +.type _init, @function +_init: + add #-4, r15 + mov.l r12, @-r15 + mov.l r14, @-r15 + sts.l pr, @-r15 + mov r15, r14 + nop + +.section .fini +.global _fini +.type _fini, @function +_fini: + add #-4, r15 + mov.l r12, @-r15 + mov.l r14, @-r15 + sts.l pr, @-r15 + mov r15, r14 + nop diff --git a/crt/sh/crtn.s b/crt/sh/crtn.s new file mode 100644 index 0000000..958ce95 --- /dev/null +++ b/crt/sh/crtn.s @@ -0,0 +1,13 @@ +.section .init + lds.l @r15+, pr + mov.l @r15+, r14 + mov.l @r15+, r12 + rts + add #4, r15 + +.section .fini + lds.l @r15+, pr + mov.l @r15+, r14 + mov.l @r15+, r12 + rts + add #4, r15 |