Files
semi-libc/src/ldso/arm/start.s
T
Rich Felker 3fa2eb2aba rename dynamic linker entry point from _start to _dlstart
the main motivation for this change is to aid in debugging. since the
main program's entry point is also named _start, it was difficult to
set breakpoints or quickly identify which _start execution stopped in.
2014-06-20 00:25:12 -04:00

19 lines
211 B
ArmAsm

.text
.global _dlstart
_dlstart:
ldr r0,[sp]
add r1,sp,#4
bl __dynlink
pop {r1}
1: sub r1,r1,#1
pop {r2}
cmp r2,#-1
beq 1b
add r1,r1,#1
push {r1,r2}
mov r1,r0
mov r0,#0
tst r1,#1
moveq pc,r1
bx r1