diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2012-05-01 17:10:10 +0200 |
---|---|---|
committer | Carlos O'Donell <carlos@systemhalted.org> | 2012-10-23 10:47:25 -0400 |
commit | c3b96f90c9c1f0b537fdf0424e8ccc61989cd8ee (patch) | |
tree | 64509e42b01afd2a165de2ccea8f5c66cc5cbc83 | |
parent | a5cfcf08ffaa8f2f6dee090b9132309e00df9888 (diff) | |
download | glibc-c3b96f90c9c1f0b537fdf0424e8ccc61989cd8ee.tar.gz glibc-c3b96f90c9c1f0b537fdf0424e8ccc61989cd8ee.tar.xz glibc-c3b96f90c9c1f0b537fdf0424e8ccc61989cd8ee.zip |
Fix missing _mcount@GLIBC_2.0 on powerpc32
(cherry picked from commit 261f485936b283f4327fc1f2fc8fd1705d805c12)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/compat-ppc-mcount.S | 11 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/ppc-mcount.S | 6 |
5 files changed, 28 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index ef468a591d..4c1d94aa49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,15 @@ * 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 507a0b1b9d..26b6f8ad84 100644 --- 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 diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile index aa2d0b9fb8..64f79003af 100644 --- a/sysdeps/powerpc/powerpc32/Makefile +++ b/sysdeps/powerpc/powerpc32/Makefile @@ -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 index 0000000000..2a9cb24072 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/compat-ppc-mcount.S @@ -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 diff --git a/sysdeps/powerpc/powerpc32/ppc-mcount.S b/sysdeps/powerpc/powerpc32/ppc-mcount.S index 9a3c041dd6..911638b5b9 100644 --- a/sysdeps/powerpc/powerpc32/ppc-mcount.S +++ b/sysdeps/powerpc/powerpc32/ppc-mcount.S @@ -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) |