aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2014-09-07 18:09:34 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2014-09-07 18:09:34 +0000
commit71c3e2ef094abfc96239472fb1d2dbdc48ecdc7c (patch)
tree746435996c27c2a979ed8e5cc74b20e06ea204cd /libgcc
parent2ce145f58fb481b37be633a46d54a477d5856e29 (diff)
downloadgcc-71c3e2ef094abfc96239472fb1d2dbdc48ecdc7c.zip
gcc-71c3e2ef094abfc96239472fb1d2dbdc48ecdc7c.tar.gz
gcc-71c3e2ef094abfc96239472fb1d2dbdc48ecdc7c.tar.bz2
libgcov-interface.c (STRONG_ALIAS): Rename to ...
* libgcov-interface.c (STRONG_ALIAS): Rename to ... (ALIAS_weak): ... here. Use forwarding function. Adjust uses. From-SVN: r215005
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/libgcov-interface.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 01b5883..4ab05ef 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-07 Nathan sidwell <nathan@acm.org>
+
+ * libgcov-interface.c (STRONG_ALIAS): Rename to ...
+ (ALIAS_weak): ... here. Use forwarding function. Adjust uses.
+
2014-09-05 Joseph Myers <joseph@codesourcery.com>
* Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc.
diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c
index 76d3f97..e4026899 100644
--- a/libgcc/libgcov-interface.c
+++ b/libgcc/libgcov-interface.c
@@ -42,11 +42,14 @@ 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)))
+ overridable global alias. Unfortunately not all targets support
+ aliases, so we just have a forwarding function. That'll be tail
+ called, so the cost is a single jump instruction.*/
+
+#define ALIAS_void_fn(src,dst) \
+ void dst (void) \
+ { src (); }
extern __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
extern __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
@@ -133,7 +136,7 @@ __gcov_reset_int (void)
__gcov_root.dumped = 0;
}
-STRONG_ALIAS (__gcov_reset_int, __gcov_reset);
+ALIAS_void_fn (__gcov_reset_int, __gcov_reset);
#endif /* L_gcov_reset */