diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-09-12 02:50:28 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-09-12 02:50:28 +0000 |
commit | ad5d8a2bf3526bce4317055612709ac076b5c4c3 (patch) | |
tree | 015d43a66be3e775c5c79171dc85ea814b98e7fb /crt/sh/crti.s | |
parent | 17cdbc4e427fd4f9cfdecb455294245732cbb36f (diff) | |
download | musl-ad5d8a2bf3526bce4317055612709ac076b5c4c3.tar.gz musl-ad5d8a2bf3526bce4317055612709ac076b5c4c3.tar.bz2 musl-ad5d8a2bf3526bce4317055612709ac076b5c4c3.tar.xz musl-ad5d8a2bf3526bce4317055612709ac076b5c4c3.zip |
make sh crti/crtn init/fini fragments setup proper stack frame
for fdpic support is is essential that the got pointer be saved at a
known, ABI-dictated offset from the frame pointer, since there is no
way to recover it once it's lost.
Diffstat (limited to 'crt/sh/crti.s')
-rw-r--r-- | crt/sh/crti.s | 8 |
1 files changed, 8 insertions, 0 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 |