about summary refs log tree commit diff
path: root/crt/arm/crti.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-06-25 16:06:09 -0400
committerRich Felker <dalias@aerifal.cx>2012-06-25 16:06:09 -0400
commit9abab94b211c5103e3f6baf97ad76523618a553c (patch)
treeae363f61070eb73b8946127e3dada19067de0e4e /crt/arm/crti.s
parentec820f1262a5d6331ad0fe9b56a8a84365766fd1 (diff)
downloadmusl-9abab94b211c5103e3f6baf97ad76523618a553c.tar.gz
musl-9abab94b211c5103e3f6baf97ad76523618a553c.tar.xz
musl-9abab94b211c5103e3f6baf97ad76523618a553c.zip
fix arm crti/crtn code
lr must be saved because init/fini-section code from the compiler
clobbers it. this was not a problem when i tested without gcc's
crtbegin/crtend files present, but with them, musl on arm fails to
work (infinite loop in _init).
Diffstat (limited to 'crt/arm/crti.s')
-rw-r--r--crt/arm/crti.s2
1 files changed, 2 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}