From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6822 invoked by alias); 8 Jun 2015 12:05:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6798 invoked by uid 89); 8 Jun 2015 12:05:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 08 Jun 2015 12:05:40 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 3203AB1FA8 for ; Mon, 8 Jun 2015 12:05:39 +0000 (UTC) Received: from littlehelper.redhat.com (vpn1-6-82.ams2.redhat.com [10.36.6.82]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t58C5bfB011204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 8 Jun 2015 08:05:38 -0400 From: Nick Clifton To: dj@redhat.com Cc: gcc-patches@gcc.gnu.org Subject: RFA: RL78: With -mes0 put read only data in the .frodata section Date: Mon, 08 Jun 2015 12:07:00 -0000 Message-ID: <87y4ju76cv.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00556.txt.bz2 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 * 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); }