This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: RL78: With -mes0 put read only data in the .frodata section
- From: Nick Clifton <nickc at redhat dot com>
- To: dj at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 08 Jun 2015 13:05:36 +0100
- Subject: RFA: RL78: With -mes0 put read only data in the .frodata section
- Authentication-results: sourceware.org; auth=none
Hi DJ,
The -mes0 option for the RL78 backend should put read only data into a
special .frodata section, but unfortunately my recent update to the
rl78_select_section function broke this behaviour. Below is a patch
to fix this. Tested with no regressions on an rl78-elf toolchain.
OK to apply ?
Cheers
Nick
gcc/ChangeLog
2015-06-08 Nick Clifton <nickc@redhat.com>
* config/rl78/rl78.c (rl78_select_section): With -mes0 put read
only data into the .frodata section.
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c (revision 224218)
+++ config/rl78/rl78.c (working copy)
@@ -4423,7 +4423,7 @@
}
if (readonly)
- return readonly_data_section;
+ return TARGET_ES0 ? frodata_section : readonly_data_section;
switch (categorize_decl_for_section (decl, reloc))
{
@@ -4430,7 +4430,7 @@
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;
+ case SECCAT_RODATA: return TARGET_ES0 ? frodata_section : readonly_data_section;
default:
return default_select_section (decl, reloc, align);
}