Add comments about why "call" instead of "jump" is used.

Related CL: https://android-review.googlesource.com/#/c/38651

Change-Id: I425e06f08fda90501a686c7e437d4e70fc1e4a1b
This commit is contained in:
Andrew Hsieh
2012-07-25 15:39:00 -07:00
parent e592bc7c06
commit e395327a7c
4 changed files with 4 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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