This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
reset class_data_always_comdat for Darwin
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Dec 2005 12:05:45 -0800 (PST)
- Subject: reset class_data_always_comdat for Darwin
This reduces the number of weak symbols exported from libstdc++ by
about 40%, which should help the loader a lot. (Of course, they're
still exported, they're just not weak; but not-weak symbols require
less processing.)
Bootstrapped & tested on powerpc-darwin8.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin-4311680.patch==================
2005-12-06 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): New.
Index: config/darwin.h
===================================================================
--- config/darwin.h (revision 108074)
+++ config/darwin.h (working copy)
@@ -419,6 +419,10 @@
#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1
+/* On Darwin, we don't (at the time of writing) have linkonce sections
+ with names, so it's safe to make the class data not comdat. */
+#define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false
+
/* We make exception information linkonce. */
#undef TARGET_USES_WEAK_UNWIND_INFO
#define TARGET_USES_WEAK_UNWIND_INFO 1
============================================================