about summary refs log tree commit diff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-09-07 22:02:42 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-07 22:02:42 -0400
commit24f579d86e13131beb3f4823e944cc447633a2c1 (patch)
tree5c59cfce65f79055e2db19597ff47ebe2d0c064d /sysdeps/powerpc
parent2270037782b05f2973372fe12f6e8d2a8c413188 (diff)
downloadglibc-24f579d86e13131beb3f4823e944cc447633a2c1.tar.gz
glibc-24f579d86e13131beb3f4823e944cc447633a2c1.tar.xz
glibc-24f579d86e13131beb3f4823e944cc447633a2c1.zip
Fix profiling on powerpc32 secure-plt shared libs and PIEs
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/Makefile4
-rw-r--r--sysdeps/powerpc/powerpc32/Makefile5
-rw-r--r--sysdeps/powerpc/powerpc32/Versions3
-rw-r--r--sysdeps/powerpc/powerpc32/ppc-mcount.S3
-rw-r--r--sysdeps/powerpc/powerpc64/Makefile1
5 files changed, 10 insertions, 6 deletions
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index 616458f136..e43ca704f0 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 1d58a063d6..ed24484c2e 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 3635c4a4a1..ad4972e4dd 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 7e39acb55b..c7720a15bc 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 136de3008e..9056e60c4e 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