+2015-05-14 Nick Clifton <nickc@redhat.com>
+
+ * config/rl78/rl78.c (rl78_select_section): Select the correct
+ default section based upon the category of the decl.
+
2015-05-13 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/30967
static section *
rl78_select_section (tree decl,
- int reloc ATTRIBUTE_UNUSED,
- unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
+ int reloc,
+ unsigned HOST_WIDE_INT align)
{
int readonly = 1;
if (readonly)
return readonly_data_section;
- return data_section;
+ switch (categorize_decl_for_section (decl, reloc))
+ {
+ case SECCAT_TEXT: return text_section;
+ case SECCAT_DATA: return data_section;
+ case SECCAT_BSS: return bss_section;
+ case SECCAT_RODATA: return readonly_data_section;
+ default:
+ return default_select_section (decl, reloc, align);
+ }
}
void