This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.12-90-gd22e4cc


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d22e4cc9397ed41534c9422d0b0ffef8c77bfa53 (commit)
      from  805bc17d6883bf6d47e49620d6f8e1b97cac9901 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d22e4cc9397ed41534c9422d0b0ffef8c77bfa53

commit d22e4cc9397ed41534c9422d0b0ffef8c77bfa53
Author: Andi Kleen <ak@linux.intel.com>
Date:   Sat Aug 7 21:24:05 2010 -0700

    x86: Add support for frame pointer less mcount

diff --git a/ChangeLog b/ChangeLog
index 012efd8..7af076b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-17  Andi Kleen  <ak@linux.intel.com>
+
+	* sysdeps/i386/i386-mcount.S (__fentry__): Define.
+	* sysdeps/x86_64/_mcount.S (__fentry__): Define.
+	* stdlib/Versions (__fentry__): Add for GLIBC 2.13
+	* Versions.def [GLIBC_2.13]: Add.
+
 2010-08-06  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
diff --git a/Versions.def b/Versions.def
index eab006b..0ccda50 100644
--- a/Versions.def
+++ b/Versions.def
@@ -29,6 +29,7 @@ libc {
   GLIBC_2.10
   GLIBC_2.11
   GLIBC_2.12
+  GLIBC_2.13
 %ifdef USE_IN_LIBIO
   HURD_CTHREADS_0.3
 %endif
diff --git a/stdlib/Versions b/stdlib/Versions
index 3e7b892..2aa396e 100644
--- a/stdlib/Versions
+++ b/stdlib/Versions
@@ -100,6 +100,9 @@ libc {
   GLIBC_2.10 {
     quick_exit; __cxa_at_quick_exit;
   }
+  GLIBC_2.13 {
+    __fentry__;
+  }
   GLIBC_PRIVATE {
     # functions which have an additional interface since they are
     # are cancelable.
diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S
index 8b11adb..43bc019 100644
--- a/sysdeps/i386/i386-mcount.S
+++ b/sysdeps/i386/i386-mcount.S
@@ -53,3 +53,28 @@ C_LABEL(_mcount)
 
 #undef mcount
 weak_alias (_mcount, mcount)
+
+	/* Same as above, but doesn't require a frame pointer */
+	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(__fentry__)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
+	.align ALIGNARG(4)
+C_LABEL(__fentry__)
+	/* Save the caller-clobbered registers.  */
+	pushl %eax
+	pushl %ecx
+	pushl %edx
+
+	movl 12(%esp), %edx
+	movl 16(%esp), %eax
+
+	/* No need to access the PLT or GOT, __mcount_internal is an
+	   internal function and we can make a relative call.  */
+	call C_SYMBOL_NAME(__mcount_internal)
+
+	/* Pop the saved registers.  Please note that `__fentry__' has no
+	   return value.  */
+	popl %edx
+	popl %ecx
+	popl %eax
+	ret
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__fentry__))
diff --git a/sysdeps/x86_64/_mcount.S b/sysdeps/x86_64/_mcount.S
index c005932..ef046dc 100644
--- a/sysdeps/x86_64/_mcount.S
+++ b/sysdeps/x86_64/_mcount.S
@@ -65,3 +65,41 @@ C_LABEL(_mcount)
 
 #undef mcount
 weak_alias (_mcount, mcount)
+
+	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(__fentry__)
+	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
+	.align ALIGNARG(4)
+C_LABEL(__fentry__)
+	/* Allocate space for 7 registers.  */
+	subq	$64,%rsp
+	movq	%rax,(%rsp)
+	movq	%rcx,8(%rsp)
+	movq	%rdx,16(%rsp)
+	movq	%rsi,24(%rsp)
+	movq	%rdi,32(%rsp)
+	movq	%r8,40(%rsp)
+	movq	%r9,48(%rsp)
+
+	/* Setup parameter for __mcount_internal.  */
+	/* selfpc is the return address on the stack.  */
+	movq	64(%rsp),%rsi
+	/* caller is the return address above it */
+	movq	72(%rsp),%rdi
+#ifdef PIC
+	call C_SYMBOL_NAME(__mcount_internal)@PLT
+#else
+	call C_SYMBOL_NAME(__mcount_internal)
+#endif
+	/* Pop the saved registers.  Please note that `__fentry__' has no
+	   return value.  */
+	movq	48(%rsp),%r9
+	movq	40(%rsp),%r8
+	movq	32(%rsp),%rdi
+	movq	24(%rsp),%rsi
+	movq	16(%rsp),%rdx
+	movq	8(%rsp),%rcx
+	movq	(%rsp),%rax
+	addq	$64,%rsp
+	ret
+
+	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__fentry__))

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |    7 +++++++
 Versions.def               |    1 +
 stdlib/Versions            |    3 +++
 sysdeps/i386/i386-mcount.S |   25 +++++++++++++++++++++++++
 sysdeps/x86_64/_mcount.S   |   38 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 74 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]