about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-24 03:57:56 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-24 03:57:56 +0000
commit44b2e5815b3d77e82a2b0bf0b729388c697cae8a (patch)
treec5345a63aa0391ac5de276830baaa8f44e4029ff
parent73e3ff07a3354d6c095e2945560755c8bc0a4387 (diff)
downloadglibc-44b2e5815b3d77e82a2b0bf0b729388c697cae8a.tar.gz
glibc-44b2e5815b3d77e82a2b0bf0b729388c697cae8a.tar.xz
glibc-44b2e5815b3d77e82a2b0bf0b729388c697cae8a.zip
* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Correctly
	align stack for call if pltexit is to be used.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/x86_64/dl-trampoline.S7
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a00dd5823..e001d1a604 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-08-23  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Correctly
+	align stack for call if pltexit is to be used.
+
 	[BZ #3924]
 	* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Correctly
 	align for function call in case pltexit has to be called later.
diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S
index c1686dae10..84fe4724b1 100644
--- a/sysdeps/x86_64/dl-trampoline.S
+++ b/sysdeps/x86_64/dl-trampoline.S
@@ -1,5 +1,5 @@
 /* PLT trampolines.  x86-64 version.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2007 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
@@ -120,13 +120,14 @@ _dl_runtime_profile:
 	leaq 104(%rsp), %rsi
 	movq %rsp, %rbx
 	cfi_def_cfa_register (1)
+	movq %r10, %rcx
+	addq $8, %r10
+	andq $0xfffffffffffffff0, %r10
 	subq %r10, %rsp
 	movq %rsp, %rdi
-	movq %r10, %rcx
 	shrq $3, %rcx
 	rep
 	movsq
-	andq $0xfffffffffffffff0, %rsp
 	movq 32(%rbx), %rcx
 	movq 40(%rbx), %rsi
 	movq 48(%rbx), %rdi