aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-interface.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2014-09-03 00:43:00 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2014-09-03 00:43:00 +0000
commitb20ee094dfddac8641eca9248998e89686f8ba38 (patch)
tree710941f33d6415af55a24f0743ce5e38cf227c5d /libgcc/libgcov-interface.c
parent4293bc0c2a25e9aa49e806ba2e237c2ac71066f0 (diff)
downloadgcc-b20ee094dfddac8641eca9248998e89686f8ba38.zip
gcc-b20ee094dfddac8641eca9248998e89686f8ba38.tar.gz
gcc-b20ee094dfddac8641eca9248998e89686f8ba38.tar.bz2
libgcov-interface.c (STRONG_ALIAS): New.
* libgcov-interface.c (STRONG_ALIAS): New. (__gcov_flush): Call __gcov_reset_int. (__gcov_reset): Strong alias for ... (__gcov_reset_ing): ... this renamed hidden version. * libgcov.h (__gcov_reset_int): New declaration. From-SVN: r214840
Diffstat (limited to 'libgcc/libgcov-interface.c')
-rw-r--r--libgcc/libgcov-interface.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c
index f73666c..76d3f97 100644
--- a/libgcc/libgcov-interface.c
+++ b/libgcc/libgcov-interface.c
@@ -42,6 +42,12 @@ void __gcov_dump (void) {}
#else
+
+/* Some functions we want to bind in this dynamic object, but have an
+ overridable global alias. */
+#define STRONG_ALIAS(src,dst) \
+ extern __typeof (src) dst __attribute__((alias (#src)))
+
extern __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
extern __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
@@ -77,7 +83,7 @@ __gcov_flush (void)
__gthread_mutex_lock (&__gcov_flush_mx);
__gcov_dump_one (&__gcov_root);
- __gcov_reset ();
+ __gcov_reset_int ();
__gthread_mutex_unlock (&__gcov_flush_mx);
}
@@ -121,12 +127,14 @@ gcov_clear (const struct gcov_info *list)
in order to collect profile in region of interest. */
void
-__gcov_reset (void)
+__gcov_reset_int (void)
{
gcov_clear (__gcov_root.list);
__gcov_root.dumped = 0;
}
+STRONG_ALIAS (__gcov_reset_int, __gcov_reset);
+
#endif /* L_gcov_reset */
#ifdef L_gcov_dump