diff options
Diffstat (limited to 'crt')
-rw-r--r-- | crt/sh/crti.s | 8 | ||||
-rw-r--r-- | crt/sh/crtn.s | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/crt/sh/crti.s b/crt/sh/crti.s index 0410ab63..d99bfd5c 100644 --- a/crt/sh/crti.s +++ b/crt/sh/crti.s @@ -2,12 +2,20 @@ .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 index dde633b0..958ce951 100644 --- a/crt/sh/crtn.s +++ b/crt/sh/crtn.s @@ -1,9 +1,13 @@ .section .init lds.l @r15+, pr + mov.l @r15+, r14 + mov.l @r15+, r12 rts - nop + add #4, r15 .section .fini lds.l @r15+, pr + mov.l @r15+, r14 + mov.l @r15+, r12 rts - nop + add #4, r15 |