This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Move __mcount_internal from GLIBC_PRIVATE to GLIBC_2.16
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 18 May 2012 16:56:46 +0200
- Subject: [PATCH] Move __mcount_internal from GLIBC_PRIVATE to GLIBC_2.16
The GLIBC_PRIVATE version is reserved for private interfaces between the
shared libraries that are part of glibc (so any interface changes are
kept in lockstep). But __mcount_internal is referenced by any object
that uses _mcount, thus needs to be properly versioned.
Andreas.
[BZ #14042]
* sysdeps/powerpc/powerpc32/mcount.c: New file.
* sysdeps/powerpc/powerpc32/Versions (GLIBC_2.16): Add
__mcount_internal.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
(GLIBC_2.16): Likewise.
---
sysdeps/powerpc/powerpc32/Versions | 3 +++
sysdeps/powerpc/powerpc32/mcount.c | 17 +++++++++++++++++
.../linux/powerpc/powerpc32/fpu/nptl/libc.abilist | 1 +
3 files changed, 21 insertions(+)
create mode 100644 sysdeps/powerpc/powerpc32/mcount.c
diff --git a/sysdeps/powerpc/powerpc32/Versions b/sysdeps/powerpc/powerpc32/Versions
index ad4972e..b0782fe 100644
--- a/sysdeps/powerpc/powerpc32/Versions
+++ b/sysdeps/powerpc/powerpc32/Versions
@@ -8,6 +8,9 @@ libc {
__fixsfdi; __fixunssfdi;
__floatdidf; __floatdisf;
}
+ GLIBC_2.16 {
+ __mcount_internal;
+ }
GLIBC_PRIVATE {
__mcount_internal;
}
diff --git a/sysdeps/powerpc/powerpc32/mcount.c b/sysdeps/powerpc/powerpc32/mcount.c
new file mode 100644
index 0000000..0476bf6
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/mcount.c
@@ -0,0 +1,17 @@
+#include <shlib-compat.h>
+
+#define __mcount_internal ___mcount_internal
+
+#include <gmon/mcount.c>
+
+#undef __mcount_internal
+
+/* __mcount_internal was added in glibc 2.15 with version GLIBC_PRIVATE,
+ but it should have been put in version GLIBC_2.15. Mark the
+ GLIBC_PRIVATE version obsolete and add it to GLIBC_2.16 instead. */
+default_symbol_version (___mcount_internal, __mcount_internal, GLIBC_2.16);
+
+#if SHLIB_COMPAT (libc, GLIBC_2_15, GLIBC_2_16)
+strong_alias (___mcount_internal, ___mcount_internal_private);
+symbol_version (___mcount_internal_private, __mcount_internal, GLIBC_PRIVATE);
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
index 41d0881..9b564ff 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
@@ -1761,6 +1761,7 @@ GLIBC_2.15
scandirat64 F
GLIBC_2.16
GLIBC_2.16 A
+ __mcount_internal F
__poll_chk F
__ppoll_chk F
aligned_alloc F
--
1.7.10.2
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."