about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-20 12:58:03 +0000
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2014-01-21 12:42:06 +0000
commitc616775d2c6df31786b71b4e135fba90b4a63f89 (patch)
tree8bca2817e63ac3ab118b84db1b274cca70a8f4b7
parent2a8396b962b8c57a2581023b62766a3ac44c3ba4 (diff)
downloadglibc-c616775d2c6df31786b71b4e135fba90b4a63f89.tar.gz
glibc-c616775d2c6df31786b71b4e135fba90b4a63f89.tar.xz
glibc-c616775d2c6df31786b71b4e135fba90b4a63f89.zip
[AArch64] BZ #16169 Add CFI directives to clone.S
[BZ #16169] Add CFI directives to the AArch64 clone.S implementation
and ensure that the FP in the child is zero'd in order to comply with
AAPCS.
(cherry picked from commit 3a3acb6afc753475675b5724f206e619d0c9590d)

Conflicts:

	NEWS
-rw-r--r--NEWS2
-rw-r--r--ports/ChangeLog.aarch646
-rw-r--r--ports/sysdeps/unix/sysv/linux/aarch64/clone.S7
3 files changed, 13 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2e8bb1684e..c914dadd53 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.18.1
 
 * The following bugs are resolved with this release:
 
-  15073, 15128, 15909, 15996, 16150, 16387.
+  15073, 15128, 15909, 15996, 16150, 16169, 16387.
 
 Version 2.18
 
diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64
index ce2fd5cf5e..89259326d6 100644
--- a/ports/ChangeLog.aarch64
+++ b/ports/ChangeLog.aarch64
@@ -1,3 +1,9 @@
+2014-01-20  Tom Tromey  <tromey@redhat.com>
+
+	[BZ #16169]
+	* sysdeps/unix/sysv/linux/aarch64/clone.S (__clone): Add CFI
+	directives;  Zero x29.
+
 2014-01-07  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
 
 	[BZ #16387]
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/clone.S b/ports/sysdeps/unix/sysv/linux/aarch64/clone.S
index b359e6e8a3..7d8816977f 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/clone.S
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/clone.S
@@ -63,6 +63,7 @@ ENTRY(__clone)
 	mov	x8, #SYS_ify(clone)
 	/* X0:flags, x1:newsp, x2:parenttidptr, x3:newtls, x4:childtid.  */
 	svc	0x0
+	cfi_endproc
 	cmp	x0, #0
 	beq	2f
 	blt	3f
@@ -72,6 +73,9 @@ ENTRY(__clone)
 	b	syscall_error
 
 2:
+	cfi_startproc
+	cfi_undefined (x30)
+	mov	x29, 0
 #ifdef RESET_PID
 	tbnz	x5, #CLONE_THREAD_BIT, 3f
 	mov	x0, #-1
@@ -93,7 +97,8 @@ ENTRY(__clone)
 
 	/* We are done, pass the return value through x0.  */
 	b	HIDDEN_JUMPTARGET(_exit)
-
+	cfi_endproc
+	cfi_startproc
 PSEUDO_END (__clone)
 
 weak_alias (__clone, clone)