This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[PATCH roland/arm-mcount] ARM: Disable compat mcount code when unneeded.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: libc-ports at sourceware dot org
- Date: Tue, 27 Aug 2013 10:30:14 -0700 (PDT)
- Subject: [PATCH roland/arm-mcount] ARM: Disable compat mcount code when unneeded.
- Authentication-results: sourceware.org; auth=none
The obsolete _mcount entry point is not needed in a shared library not
supporting any old ABIs. This change also makes it unavailable for static
linking altogether. We have never supported linking old object files with
new libraries, so that should not be a problem for existing configurations.
Thanks,
Roland
ports/ChangeLog.arm
2013-08-27 Roland McGrath <roland@hack.frob.com>
* sysdeps/arm/arm-mcount.S: #include <shlib-compat.h>.
(_mcount, mcount):
Protect under [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)].
--- a/ports/sysdeps/arm/arm-mcount.S
+++ b/ports/sysdeps/arm/arm-mcount.S
@@ -65,6 +65,10 @@ ENTRY(__gnu_mcount_nc)
END(__gnu_mcount_nc)
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)
+
/* Provide old mcount for backwards compatibility. This requires
code be compiled with APCS frame pointers. */
@@ -102,3 +106,5 @@ END(_mcount)
but some old asm code might assume it's `mcount'. */
#undef mcount
weak_alias (_mcount, mcount)
+
+#endif