aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-05-24 00:54:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-24 00:54:16 +0000
commitf4985b14cfed187376a24dd4a0cd16206e746bd9 (patch)
tree882e74eff6ba2eb37d9f617e9f5ee4fdcec7e52d
parenta486632e789c6db4c35f969485ebb57f503bcf48 (diff)
parent8df0fe0c74b7af819f36e37ec9b924fdd22c8ba4 (diff)
downloadandroid_bionic-f4985b14cfed187376a24dd4a0cd16206e746bd9.tar.gz
android_bionic-f4985b14cfed187376a24dd4a0cd16206e746bd9.tar.bz2
android_bionic-f4985b14cfed187376a24dd4a0cd16206e746bd9.zip
Merge "Clear link register in __bionic_clone."
-rw-r--r--libc/arch-arm/bionic/__bionic_clone.S9
-rw-r--r--libc/arch-arm64/bionic/__bionic_clone.S4
2 files changed, 4 insertions, 9 deletions
diff --git a/libc/arch-arm/bionic/__bionic_clone.S b/libc/arch-arm/bionic/__bionic_clone.S
index 7cc4db56b..2643ae00d 100644
--- a/libc/arch-arm/bionic/__bionic_clone.S
+++ b/libc/arch-arm/bionic/__bionic_clone.S
@@ -54,19 +54,14 @@ ENTRY(__bionic_clone)
# In the parent, reload saved registers then either return or set errno.
ldmfd sp!, {r4, r5, r6, r7}
- .cfi_def_cfa_offset 0
cmn r0, #(MAX_ERRNO + 1)
bxls lr
neg r0, r0
b __set_errno
1: # The child.
- # Re-add the unwind directives that were reset from above.
- .cfi_def_cfa_offset 16
- .cfi_rel_offset r4, 0
- .cfi_rel_offset r5, 4
- .cfi_rel_offset r6, 8
- .cfi_rel_offset r7, 12
+ # Setting lr to 0 will make the unwinder stop at __bionic_clone_entry
+ mov lr, #0
ldr r0, [sp, #-4]
ldr r1, [sp, #-8]
b __bionic_clone_entry
diff --git a/libc/arch-arm64/bionic/__bionic_clone.S b/libc/arch-arm64/bionic/__bionic_clone.S
index c49782cf0..d3c03742d 100644
--- a/libc/arch-arm64/bionic/__bionic_clone.S
+++ b/libc/arch-arm64/bionic/__bionic_clone.S
@@ -61,9 +61,9 @@ ENTRY(__bionic_clone)
.L_bc_child:
# We're in the child now. Set the end of the frame record chain...
- .cfi_undefined x29
- .cfi_undefined x30
mov x29, xzr
+ # Setting x30 to 0 will make the unwinder stop at __bionic_clone_entry
+ mov x30, xzr
# ...and call __bionic_clone_entry with the 'fn' and 'arg' we stored on the child stack.
ldp x0, x1, [sp, #-16]
b __bionic_clone_entry