diff mbox

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

Message ID 87y4ju76cv.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton June 8, 2015, 12:05 p.m. UTC
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.

Comments

DJ Delorie June 8, 2015, 5:29 p.m. UTC | #1
Ok.  Thanks!
diff mbox

Patch

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