From 9abab94b211c5103e3f6baf97ad76523618a553c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 25 Jun 2012 16:06:09 -0400 Subject: 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). --- crt/arm/crtn.s | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crt/arm/crtn.s') 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 -- cgit 1.4.1