summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugenis@google.com>2012-04-18 12:57:40 +0400
committerEvgeniy Stepanov <eugenis@google.com>2012-04-18 12:59:38 +0400
commit4a9d6e50bb800eeadf579eb36b63e8b2eedb0d43 (patch)
tree237902797b5e2163c27889e4ff1f8ede513d88bb
parent762a4fe2eed6a36b14d3b378c2974ad355d97d54 (diff)
downloadbionic-4a9d6e50bb800eeadf579eb36b63e8b2eedb0d43.zip
bionic-4a9d6e50bb800eeadf579eb36b63e8b2eedb0d43.tar.gz
bionic-4a9d6e50bb800eeadf579eb36b63e8b2eedb0d43.tar.bz2
Fix segv when unwinding stack past __libc_init.
This change mirrors cd15bac for statically-linked binaries. Change-Id: Id870832a50b37f0ef3e79e1ed03ed31390bfc9ef
-rw-r--r--libc/arch-arm/bionic/crtbegin_static.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/arch-arm/bionic/crtbegin_static.S b/libc/arch-arm/bionic/crtbegin_static.S
index e62ac1d..087ce36 100644
--- a/libc/arch-arm/bionic/crtbegin_static.S
+++ b/libc/arch-arm/bionic/crtbegin_static.S
@@ -53,7 +53,9 @@ _start:
ldr r2, =main
adr r3, 1f
ldr r4, =__libc_init
- bx r4
+ blx r4
+ mov r0, #0
+ bx r0
1: .long __PREINIT_ARRAY__
.long __INIT_ARRAY__