mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-23 22:52:23 +03:00
9abab94b21
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).
12 lines
113 B
ArmAsm
12 lines
113 B
ArmAsm
.section .init
|
|
pop {lr}
|
|
tst lr,#1
|
|
moveq pc,lr
|
|
bx lr
|
|
|
|
.section .fini
|
|
pop {lr}
|
|
tst lr,#1
|
|
moveq pc,lr
|
|
bx lr
|