https://sourceware.org/bugzilla/show_bug.cgi?id=25315

--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> ---
Okay, it appears to me we need to do something special in
elf_select_rtx_section.  Otherwise, plabels end up in the section selected by
mergeable_constant_section().

dave@atlas:~/gnu/gcc/gcc/gcc/config/pa$ svn diff .
Index: pa-linux.h
===================================================================
--- pa-linux.h  (revision 279757)
+++ pa-linux.h  (working copy)
@@ -130,6 +130,9 @@
     }                                                          \
   while (0)

+#undef TARGET_ASM_SELECT_RTX_SECTION
+#define TARGET_ASM_SELECT_RTX_SECTION pa_elf_select_rtx_section
+
 #undef TARGET_GAS
 #define TARGET_GAS 1

Index: pa.c
===================================================================
--- pa.c        (revision 279757)
+++ pa.c        (working copy)
@@ -203,6 +203,7 @@
 static bool pa_modes_tieable_p (machine_mode, machine_mode);
 static bool pa_can_change_mode_class (machine_mode, machine_mode,
reg_class_t);
 static HOST_WIDE_INT pa_starting_frame_offset (void);
+static section* pa_elf_select_rtx_section(machine_mode, rtx, unsigned
HOST_WIDE_INT) ATTRIBUTE_UNUSED;

 /* The following extra sections are only used for SOM.  */
 static GTY(()) section *som_readonly_data_section;
@@ -9838,6 +9839,16 @@
     return data_section;
 }

+static section *
+pa_elf_select_rtx_section (machine_mode mode, rtx x,
+                          unsigned HOST_WIDE_INT align)
+{
+  if (function_label_operand (x, VOIDmode))
+    return get_variable_section (SYMBOL_REF_DECL (x), true);
+
+  return default_elf_select_rtx_section (mode, x, align);
+}
+
 /* Implement pa_reloc_rw_mask.  */

 static int

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to