about summary refs log tree commit diff
path: root/crt
diff options
context:
space:
mode:
Diffstat (limited to 'crt')
-rw-r--r--crt/arm/crti.s2
-rw-r--r--crt/arm/crtn.s2
2 files changed, 4 insertions, 0 deletions
diff --git a/crt/arm/crti.s b/crt/arm/crti.s
index 2eb23ed5..0dd978a8 100644
--- a/crt/arm/crti.s
+++ b/crt/arm/crti.s
@@ -1,7 +1,9 @@
 .section .init
 .global _init
 _init:
+	push {lr}
 
 .section .fini
 .global _fini
 _fini:
+	push {lr}
diff --git a/crt/arm/crtn.s b/crt/arm/crtn.s
index 9d7107d0..5d5d6454 100644
--- a/crt/arm/crtn.s
+++ b/crt/arm/crtn.s
@@ -1,9 +1,11 @@
 .section .init
+	pop {lr}
 	tst lr,#1
 	moveq pc,lr
 	bx lr
 
 .section .fini
+	pop {lr}
 	tst lr,#1
 	moveq pc,lr
 	bx lr