This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch roland/arm-mcount created. glibc-2.18-781-g74dc384
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 10 Jan 2014 21:17:51 -0000
- Subject: GNU C Library master sources branch roland/arm-mcount created. glibc-2.18-781-g74dc384
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, roland/arm-mcount has been created
at 74dc3842f20e64ec52a5cb8ec5e6b78f83bb5683 (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74dc3842f20e64ec52a5cb8ec5e6b78f83bb5683
commit 74dc3842f20e64ec52a5cb8ec5e6b78f83bb5683
Author: Roland McGrath <roland@hack.frob.com>
Date: Fri Jan 10 13:16:45 2014 -0800
ARM: Disable compat mcount code when unneeded.
diff --git a/ChangeLog b/ChangeLog
index 9a19fbf..8142134 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-10 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/generic/gcc-compat.h: New file.
+
2014-01-10 Siddhesh Poyarekar <siddhesh@redhat.com>
* benchtests/asin-inputs: Correct slow inputs.
diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 3133774..353c3d6 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,14 @@
+2014-01-10 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/arm-mcount.S:
+ #include <shlib-compat.h> and <gcc-compat.h>.
+ (_mcount): Renamed to __mcount_arm_compat. Made conditional on
+ [GCC_COMPAT (4, 3) || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)].
+ (_mcount, mcount): Define (as aliases) only under [GCC_COMPAT (4, 3)],
+ with compat_symbol under [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)].
+
+ * sysdeps/arm/gcc-compat.h: New file.
+
2014-01-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/libm-test-ulps: Regenerated.
@@ -7,7 +18,9 @@
* sysdeps/arm/fegetround.c (fegetround): Use libm_hidden_def.
2013-11-26 OndÅ?ej BÃlka <neleai@seznam.cz>
- * sysdeps/unix/sysv/linux/arm/bits/shm.h: Use __glibc_reserved instead __unused.
+
+ * sysdeps/unix/sysv/linux/arm/bits/shm.h: Use __glibc_reserved
+ instead of __unused.
2013-11-22 Roland McGrath <roland@hack.frob.com>
diff --git a/ports/sysdeps/arm/arm-mcount.S b/ports/sysdeps/arm/arm-mcount.S
index 8b8653c..7e433c6 100644
--- a/ports/sysdeps/arm/arm-mcount.S
+++ b/ports/sysdeps/arm/arm-mcount.S
@@ -21,6 +21,7 @@
#include <sysdep.h>
+#undef mcount
#ifdef __thumb2__
.thumb
@@ -65,10 +66,20 @@ ENTRY(__gnu_mcount_nc)
END(__gnu_mcount_nc)
+#include <gcc-compat.h>
+#include <shlib-compat.h>
+
+/* The new __gnu_mcount_nc entry point was introduced in 4.4, so the
+ static library needs the old one only to support older compilers.
+ Even in a configuration that only cares about newer compilers, the
+ shared library might need it only for strict ABI compatibility. */
+
+#if GCC_COMPAT (4, 3) || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)
+
/* Provide old mcount for backwards compatibility. This requires
code be compiled with APCS frame pointers. */
-ENTRY(_mcount)
+ENTRY(__mcount_arm_compat)
push {r0, r1, r2, r3, fp, lr}
cfi_adjust_cfa_offset (24)
cfi_rel_offset (r0, 0)
@@ -83,7 +94,7 @@ ENTRY(_mcount)
ldrne r0, [\B, #-4]
movsne r1, lr
blne __mcount_internal
-#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
+# if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
pop {r0, r1, r2, r3, fp, lr}
cfi_adjust_cfa_offset (-24)
cfi_restore (r0)
@@ -93,12 +104,26 @@ ENTRY(_mcount)
cfi_restore (fp)
cfi_restore (lr)
bx lr
-#else
+# else
pop {r0, r1, r2, r3, fp, pc}
+# endif
+END(__mcount_arm_compat)
+
#endif
-END(_mcount)
+
+#if GCC_COMPAT (4, 3)
+
+strong_alias (__mcount_arm_compat, _mcount)
/* The canonical name for the function is `_mcount' in both C and asm,
but some old asm code might assume it's `mcount'. */
-#undef mcount
weak_alias (_mcount, mcount)
+
+#elif SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)
+
+compat_symbol (libc, __mcount_arm_compat, _mcount, GLIBC_2_0)
+
+strong_alias (__mcount_arm_compat, __mcount_arm_compat_1)
+compat_symbol (libc, __mcount_arm_compat_1, mcount, GLIBC_2_0)
+
+#endif
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources