about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-08 18:23:53 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-08 18:23:53 +0000
commit249a3d0c4ffb36f4aacdbae357b371d53325f674 (patch)
tree11fb4e3b8c168558fc92a6d4361221a793ac3239 /sysdeps/unix
parentf39eef7b5d2539cffa1149b0bbeb75f513a4ace3 (diff)
downloadglibc-249a3d0c4ffb36f4aacdbae357b371d53325f674.tar.gz
glibc-249a3d0c4ffb36f4aacdbae357b371d53325f674.tar.xz
glibc-249a3d0c4ffb36f4aacdbae357b371d53325f674.zip
Update.
2004-01-08  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/clone.S (__clone): Add cfi_endproc
	right before syscall and cfi_startproc before PSEUDO_END.
	Clear %rbp in thread_start.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/clone.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S b/sysdeps/unix/sysv/linux/x86_64/clone.S
index c8d7becc75..d182fe2f9e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clone.S
+++ b/sysdeps/unix/sysv/linux/x86_64/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -72,6 +72,10 @@ ENTRY (BP_SYM (__clone))
 	movq	%r9, %r8
 	movq	8(%rsp), %r10
 	movq	$SYS_ify(clone),%rax
+
+	/* End FDE now, because in the child the unwind info will be
+	   wrong.  */
+	cfi_endproc;
 	syscall
 
 	testq	%rax,%rax
@@ -82,6 +86,10 @@ L(pseudo_end):
 	ret
 
 thread_start:
+	/* Clear the frame pointer.  The ABI suggests this be done, to mark
+	   the outermost frame obviously.  */
+	xorq	%rbp, %rbp
+
 	/* Set up arguments for the function call.  */
 	popq	%rax		/* Function to call.  */
 	popq	%rdi		/* Argument.  */
@@ -90,6 +98,7 @@ thread_start:
 	movq	%rax, %rdi
 	call	HIDDEN_JUMPTARGET (_exit)
 
+	cfi_startproc;
 PSEUDO_END (BP_SYM (__clone))
 
 weak_alias (BP_SYM (__clone), BP_SYM (clone))