From patchwork Mon Jun 8 12:05:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 481854 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9159514016A for ; Mon, 8 Jun 2015 22:05:59 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uuwitW4F; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=iHf1XwJCSoCYhSAXjPcDq0f2Uvs6yGBoero+h+Wllh3thC7Qu2 F2bvGU0K7JOfby+rpk6w8AX1waSzhUC84sK/jNerguvNWylV0L4h68nfJf85nOUg KwmnL2iHyUrPYr5A7Dk2h0EweneTeUnf7AHAw+RruDxfS/DLVy2rYxZuw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=HGmfP/QUn36j55zJQoJgSRshkro=; b=uuwitW4F+jmR/fAGdsrW 8l/v09pw4BIQs5NEGgSSDv7abZXUByUP3d01B1iXb2+FzH3PthpfqzVk43VwJG8w 0GbU8mAWCAHplLMOXD89VLbIBYRO3NeunG67T2oWISV+CWhnjSVqxTQXS80ZM49k uNHaNNzZYo/09W1fBB0kkOQ= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 13:05:36 +0100 Message-ID: <87y4ju76cv.fsf@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes 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); }