]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix missing _mcount@GLIBC_2.0 on powerpc32
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 1 May 2012 15:10:10 +0000 (17:10 +0200)
committerCarlos O'Donell <carlos@systemhalted.org>
Tue, 23 Oct 2012 14:47:25 +0000 (10:47 -0400)
(cherry picked from commit 261f485936b283f4327fc1f2fc8fd1705d805c12)

ChangeLog
NEWS
sysdeps/powerpc/powerpc32/Makefile
sysdeps/powerpc/powerpc32/compat-ppc-mcount.S [new file with mode: 0644]
sysdeps/powerpc/powerpc32/ppc-mcount.S

index ef468a591d946b5cd2713e169b4e65ad2683920f..4c1d94aa4940f1e7bac7780165f7e4dcb133565c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * stdio-common/vfprintf.c (process_string_arg): Revert
        2000-07-22 change.
 
+2012-07-06  Andreas Schwab  <schwab@linux-m68k.org>
+
+       [BZ #14042]
+       * sysdeps/powerpc/powerpc32/ppc-mcount.S [SHARED]: Don't use PLT
+       for call to __mcount_internal.
+       * sysdeps/powerpc/powerpc32/Makefile (sysdep_routines)
+       (shared-only-routines) [$(subdir) = gmon]: Add compat-ppc-mcount.
+       * sysdeps/powerpc/powerpc32/compat-ppc-mcount.S: New file.
+
 2011-09-28  Jonathan Nieder  <jrnieder@gmail.com>
 
        * stdio-common/Makefile (tst-sprintf-ENV): Set environment
diff --git a/NEWS b/NEWS
index 507a0b1b9d72672b75960b113dd88f61622d744c..26b6f8ad8494244edf03322de3a50fb24c95ea73 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.16.1
 
 * The following bugs are resolved with this release:
 
-  6530, 14195, 14459, 14476, 14562, 14621, 14648
+  6530, 14195, 14459, 14476, 14562, 14621, 14648, 14756
 
 Version 2.16
 
index aa2d0b9fb8c51d7b03e7a856a830b8feb23ab67a..64f79003af264964dd7fbded59aadf6404c7be79 100644 (file)
@@ -6,8 +6,9 @@ sysdep-LDFLAGS += -msoft-float
 endif
 
 ifeq ($(subdir),gmon)
-sysdep_routines += ppc-mcount
+sysdep_routines += ppc-mcount compat-ppc-mcount
 static-only-routines += ppc-mcount
+shared-only-routines += compat-ppc-mcount
 endif
 
 ifeq ($(subdir),misc)
diff --git a/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S b/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S
new file mode 100644 (file)
index 0000000..2a9cb24
--- /dev/null
@@ -0,0 +1,11 @@
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_15)
+
+       compat_text_section
+# define _mcount __compat_mcount
+# include "ppc-mcount.S"
+# undef _mcount
+
+compat_symbol (libc, __compat_mcount, _mcount, GLIBC_2_0)
+#endif
index 9a3c041dd64860aecc9d81dcc889ab9926d2becc..911638b5b9ab6c9d14a007876f76d650a9062b3a 100644 (file)
@@ -1,5 +1,5 @@
 /* PowerPC-specific implementation of profiling support.
-   Copyright (C) 1997, 1999, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 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
@@ -57,7 +57,11 @@ ENTRY(_mcount)
        stw     r4, 44(r1)
        cfi_offset (lr, -4)
        stw     r5,  8(r1)
+#ifndef SHARED
        bl      JUMPTARGET(__mcount_internal)
+#else
+       bl      __mcount_internal@local
+#endif
  /* Restore the registers...  */
        lwz     r6,  8(r1)
        lwz     r0, 44(r1)