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, ibm/2.13/master, updated. glibc-2.13-35-gab2ccee


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, ibm/2.13/master has been updated
       via  ab2cceea626dd984d65b301b3588ae80d42f220b (commit)
      from  9cb11a4f1e562490f02ef634946ec015bf6e75e4 (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=ab2cceea626dd984d65b301b3588ae80d42f220b

commit ab2cceea626dd984d65b301b3588ae80d42f220b
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Aug 19 11:39:38 2011 -0500

    Fix profiling on powerpc32 secure-plt shared libs and PIEs
    
    This patch moves the ppc32 _mcount to libc_shared.a, fixing a
    long-standing bug with profiling of secure-plt shared libraries and
    PIEs.  The problem is that a ppc32 PIC PLT call stub uses r30 (GOT
    pointer) to load the function address from the PLT, r30 being set up
    in the function prologue, but _mcount is called before the function
    prologue.  So chances are good that r30 will be pointing to the
    executable GOT when trying to call _mcount in a shared lib function.
    A similar problem can occur in a PIE if a shared lib calls a function
    in the executable.

diff --git a/ChangeLog b/ChangeLog
index 085dad0..88cccd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,18 @@
 	* sysdeps/ieee754/ldbl-128ibm/s_fmal.c: New file which checks
 	for finite and infinity parameters.
 
+2011-08-15  Alan Modra  <amodra@gmail.com>
+
+	PR 13092
+	* sysdeps/powerpc/Makefile (gmon): Move sysdep_routines to..
+	* sysdeps/powerpc/powerpc64/Makefile (gmon): ..here..
+	* sysdeps/powerpc/powerpc32/Makefile (gmon): ..and here.  Add
+	ppc_mcount to static-only-routines.
+	* sysdeps/powerpc/powerpc32/Versions: Export GLIBC_PRIVATE
+	__mcount_internal.
+	* sysdeps/powerpc/powerpc32/ppc-mcount.S (_mcount): Call
+	__mcount_internal with usual JUMPTARGET.  Remove useless nop.
+
 2011-08-04  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
 	* sysdeps/powerpc/powerpc32/power7/strncmp.S: Adjust the alignment
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index 616458f..e43ca70 100644
--- a/sysdeps/powerpc/Makefile
+++ b/sysdeps/powerpc/Makefile
@@ -2,10 +2,6 @@
 # machine.
 +cflags += -mnew-mnemonics
 
-ifeq ($(subdir),gmon)
-sysdep_routines += ppc-mcount
-endif
-
 ifeq ($(subdir),string)
 CFLAGS-memcmp.c += -Wno-uninitialized
 endif
diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile
index 1d58a06..ed24484 100644
--- a/sysdeps/powerpc/powerpc32/Makefile
+++ b/sysdeps/powerpc/powerpc32/Makefile
@@ -5,6 +5,11 @@ ifeq ($(with-fp),no)
 sysdep-LDFLAGS += -msoft-float
 endif
 
+ifeq ($(subdir),gmon)
+sysdep_routines += ppc-mcount
+static-only-routines += ppc-mcount
+endif
+
 ifeq ($(subdir),misc)
 sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
 endif
diff --git a/sysdeps/powerpc/powerpc32/Versions b/sysdeps/powerpc/powerpc32/Versions
index 3635c4a..ad4972e 100644
--- a/sysdeps/powerpc/powerpc32/Versions
+++ b/sysdeps/powerpc/powerpc32/Versions
@@ -8,6 +8,9 @@ libc {
     __fixsfdi; __fixunssfdi;
     __floatdidf; __floatdisf;
   }
+  GLIBC_PRIVATE {
+    __mcount_internal;
+  }
 }
 
 libm {
diff --git a/sysdeps/powerpc/powerpc32/ppc-mcount.S b/sysdeps/powerpc/powerpc32/ppc-mcount.S
index 7e39acb..0460ef1 100644
--- a/sysdeps/powerpc/powerpc32/ppc-mcount.S
+++ b/sysdeps/powerpc/powerpc32/ppc-mcount.S
@@ -58,8 +58,7 @@ ENTRY(_mcount)
 	stw	r4, 44(r1)
 	cfi_offset (lr, -4)
 	stw	r5,  8(r1)
-	bl	__mcount_internal@local
-	nop
+	bl      JUMPTARGET(__mcount_internal)
  /* Restore the registers...  */
 	lwz     r6,  8(r1)
 	lwz	r0, 44(r1)
diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
index 4d9be6c..338b900 100644
--- a/sysdeps/powerpc/powerpc64/Makefile
+++ b/sysdeps/powerpc/powerpc64/Makefile
@@ -45,4 +45,5 @@ ifeq ($(subdir),gmon)
 # Compiling with -msoft-float ensures that fp regs are not used
 # for moving memory around.
 CFLAGS-mcount.c += $(no-special-regs)
+sysdep_routines += ppc-mcount
 endif

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

Summary of changes:
 ChangeLog                              |   12 ++++++++++++
 sysdeps/powerpc/Makefile               |    4 ----
 sysdeps/powerpc/powerpc32/Makefile     |    5 +++++
 sysdeps/powerpc/powerpc32/Versions     |    3 +++
 sysdeps/powerpc/powerpc32/ppc-mcount.S |    3 +--
 sysdeps/powerpc/powerpc64/Makefile     |    1 +
 6 files changed, 22 insertions(+), 6 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]