mirror of
git://git.musl-libc.org/musl
synced 2025-03-05 11:17:27 +00:00
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.
This commit is contained in:
parent
acb7e049b8
commit
3fa2eb2aba
2
Makefile
2
Makefile
@ -125,7 +125,7 @@ $(foreach s,$(wildcard src/*/$(ARCH)*/*.s),$(eval $(call mkasmdep,$(s))))
|
|||||||
|
|
||||||
lib/libc.so: $(LOBJS)
|
lib/libc.so: $(LOBJS)
|
||||||
$(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS) -nostdlib -shared \
|
$(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS) -nostdlib -shared \
|
||||||
-Wl,-e,_start -Wl,-Bsymbolic-functions \
|
-Wl,-e,_dlstart -Wl,-Bsymbolic-functions \
|
||||||
-o $@ $(LOBJS) $(LIBCC)
|
-o $@ $(LOBJS) $(LIBCC)
|
||||||
|
|
||||||
lib/libc.a: $(OBJS)
|
lib/libc.a: $(OBJS)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.text
|
.text
|
||||||
.global _start
|
.global _dlstart
|
||||||
_start:
|
_dlstart:
|
||||||
ldr r0,[sp]
|
ldr r0,[sp]
|
||||||
add r1,sp,#4
|
add r1,sp,#4
|
||||||
bl __dynlink
|
bl __dynlink
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.text
|
.text
|
||||||
.global _start
|
.global _dlstart
|
||||||
_start:
|
_dlstart:
|
||||||
xor %ebp,%ebp
|
xor %ebp,%ebp
|
||||||
pop %edi
|
pop %edi
|
||||||
mov %esp,%esi
|
mov %esp,%esi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# FIXME: clearing argv entries
|
# FIXME: clearing argv entries
|
||||||
.global _start
|
.global _dlstart
|
||||||
_start:
|
_dlstart:
|
||||||
add r19, r0, r0
|
add r19, r0, r0
|
||||||
|
|
||||||
lw r5, r0, r1
|
lw r5, r0, r1
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.hidden __reloc_self
|
.hidden __reloc_self
|
||||||
.set noreorder
|
.set noreorder
|
||||||
.set nomacro
|
.set nomacro
|
||||||
.global _start
|
.global _dlstart
|
||||||
.type _start,@function
|
.type _dlstart,@function
|
||||||
_start:
|
_dlstart:
|
||||||
move $fp, $0
|
move $fp, $0
|
||||||
|
|
||||||
bgezal $0, 1f
|
bgezal $0, 1f
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.global _start
|
.global _dlstart
|
||||||
.type _start,@function
|
.type _dlstart,@function
|
||||||
_start:
|
_dlstart:
|
||||||
bl 1f
|
bl 1f
|
||||||
2: .long _DYNAMIC-2b
|
2: .long _DYNAMIC-2b
|
||||||
1: mflr 5
|
1: mflr 5
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.text
|
.text
|
||||||
.global _start
|
.global _dlstart
|
||||||
.type _start, @function
|
.type _dlstart, @function
|
||||||
_start:
|
_dlstart:
|
||||||
mov.l @r15, r4
|
mov.l @r15, r4
|
||||||
mov r15, r5
|
mov r15, r5
|
||||||
mov.l L1, r0
|
mov.l L1, r0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.text
|
.text
|
||||||
.global _start
|
.global _dlstart
|
||||||
_start:
|
_dlstart:
|
||||||
mov (%rsp),%rdi /* move argc into 1st argument slot */
|
mov (%rsp),%rdi /* move argc into 1st argument slot */
|
||||||
lea 4(%rsp),%rsi /* move argv into 2nd argument slot */
|
lea 4(%rsp),%rsi /* move argv into 2nd argument slot */
|
||||||
call __dynlink
|
call __dynlink
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.text
|
.text
|
||||||
.global _start
|
.global _dlstart
|
||||||
_start:
|
_dlstart:
|
||||||
mov (%rsp),%rdi
|
mov (%rsp),%rdi
|
||||||
lea 8(%rsp),%rsi
|
lea 8(%rsp),%rsi
|
||||||
call __dynlink
|
call __dynlink
|
||||||
|
Loading…
Reference in New Issue
Block a user