At least Darwin needs a different name for the tm_clone_table section.
I'm wondering what a target without named sections does for this - is
there some reason it needs to be in a separate section (from data)...
... perhaps what I'm missing here will help understand why the clone
tests fail on *x68*-darwin :-)
comments/OK for trunk?
Iain
gcc:
* defaults.h (TM_CLONE_TABLE_SECTION_NAME): Provide default
tm clone section name.
* varasm.c (dump_tm_clone_pairs): Use TM_CLONE_TABLE_SECTION_NAME.
* config/darwin.h (TM_CLONE_TABLE_SECTION_NAME): Define.
Index: gcc/defaults.h
===================================================================
--- gcc/defaults.h (revision 181476)
+++ gcc/defaults.h (working copy)
@@ -392,6 +392,14 @@ see the files COPYING3 and COPYING.RUNTIME respect
#endif
#endif
+/* If we have named sections, provide a name for the transaction clone
+ table section. */
+#if defined (TARGET_ASM_NAMED_SECTION)
+#ifndef TM_CLONE_TABLE_SECTION_NAME
+#define TM_CLONE_TABLE_SECTION_NAME ".tm_clone_table"
+#endif
+#endif
+
/* If we have named section and we support weak symbols, then use the
.jcr section for recording java classes which need to be registered
at program start-up time. */
Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c (revision 181476)
+++ gcc/varasm.c (working copy)
@@ -5961,7 +5961,9 @@ dump_tm_clone_pairs (VEC(tm_alias_pair,heap) *tm_a
if (!switched)
{
- switch_to_section (get_named_section (NULL, ".tm_clone_table", 3));
+ switch_to_section (get_named_section (NULL,
+ TM_CLONE_TABLE_SECTION_NAME,
+ 3));
assemble_align (POINTER_SIZE);
switched = true;
}
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 181476)
+++ gcc/config/darwin.h (working copy)
@@ -692,6 +680,10 @@ extern GTY(()) section * darwin_sections[NUM_DARWI
#define TARGET_ASM_UNIQUE_SECTION darwin_unique_section
#undef TARGET_ASM_FUNCTION_RODATA_SECTION
#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
+
+#undef TM_CLONE_TABLE_SECTION_NAME
+#define TM_CLONE_TABLE_SECTION_NAME "__DATA,__tm_clone_table"
+
#undef TARGET_ASM_RELOC_RW_MASK
#define TARGET_ASM_RELOC_RW_MASK machopic_reloc_rw_mask