rl78.c (rl78_select_section): When -mes0 is active place read only data in the .froda...
authorNick Clifton <nickc@redhat.com>
Tue, 9 Jun 2015 08:17:06 +0000 (08:17 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 9 Jun 2015 08:17:06 +0000 (08:17 +0000)
* config/rl78/rl78.c (rl78_select_section): When -mes0 is active
place read only data in the .frodata section.

From-SVN: r224270

gcc/ChangeLog
gcc/config/rl78/rl78.c

index 95a6df4e3fa01877c92c4bc39b231ce60e160cee..4cb644628cc23d1c8175192a4dda7e8883bd267b 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-09  Nick Clifton  <nickc@redhat.com>
+
+       * config/rl78/rl78.c (rl78_select_section): When -mes0 is active
+       place read only data in the .frodata section.
+
 2015-06-09  Shiva Chen  <shiva0217@gmail.com>
 
        * sync.md (atomic_load<mode>): Add conditional code for lda/ldr
index 1ab2705b2a0db0fbd644f749704dbccd50674683..49bca043f41395bfb053877a816029fd0643235c 100644 (file)
@@ -4417,14 +4417,14 @@ rl78_select_section (tree decl,
     }
 
   if (readonly)
-    return readonly_data_section;
+    return TARGET_ES0 ? frodata_section : readonly_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;
+    case SECCAT_RODATA: return TARGET_ES0 ? frodata_section : readonly_data_section;
     default:
       return default_select_section (decl, reloc, align);
     }