This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: RL78: With -mes0 put read only data in the .frodata section


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);
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]