am 21f8a3c5: Merge "Add comments about why "call" instead of "jump" is used."
* commit '21f8a3c51d15c3d270be3923f518e047eaee6d04': Add comments about why "call" instead of "jump" is used.
This commit is contained in:
@@ -53,6 +53,7 @@ _start:
|
|||||||
ldr r2, =main
|
ldr r2, =main
|
||||||
adr r3, 1f
|
adr r3, 1f
|
||||||
ldr r4, =__libc_init
|
ldr r4, =__libc_init
|
||||||
|
# Use blx intead of bx so stack unwinding past __libc_init can terminate at _start
|
||||||
blx r4
|
blx r4
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
bx r0
|
bx r0
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ _start:
|
|||||||
ldr r2, =main
|
ldr r2, =main
|
||||||
adr r3, 1f
|
adr r3, 1f
|
||||||
ldr r4, =__libc_init
|
ldr r4, =__libc_init
|
||||||
|
# Use blx intead of bx so stack unwinding past __libc_init can terminate at _start
|
||||||
blx r4
|
blx r4
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
bx r0
|
bx r0
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ _start:
|
|||||||
la $a3, 1f
|
la $a3, 1f
|
||||||
subu $sp, 32
|
subu $sp, 32
|
||||||
la $t9, __libc_init
|
la $t9, __libc_init
|
||||||
|
# Use jalr intead of jr so stack unwinding past __libc_init can terminate at _start
|
||||||
jalr $t9
|
jalr $t9
|
||||||
move $t9, $0
|
move $t9, $0
|
||||||
j $t9
|
j $t9
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ _start:
|
|||||||
la $a3, 1f
|
la $a3, 1f
|
||||||
subu $sp, 32
|
subu $sp, 32
|
||||||
la $t9, __libc_init
|
la $t9, __libc_init
|
||||||
|
# Use jalr intead of jr so stack unwinding past __libc_init can terminate at _start
|
||||||
jalr $t9
|
jalr $t9
|
||||||
move $t9, $0
|
move $t9, $0
|
||||||
j $t9
|
j $t9
|
||||||
|
|||||||
Reference in New Issue
Block a user