From patchwork Thu Dec 29 21:16:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 133596 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]) by ozlabs.org (Postfix) with SMTP id 54B32B6F70 for ; Fri, 30 Dec 2011 08:17:31 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1325798252; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Date:From:To:Subject: Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=C0z977GbMUKyhIex1VPC6G5nK/Y=; b=B/EFYQiBWYKEh0qiwGulUc+HTprFliCmcHaH0R9j+qQsLUceOKH1JydunN8GRk 6PLSjRA3yQoUgUpH4icq8Jm4H+lk5obBPg/b/oBxWzma1y3jLUlyiK9+2euJpD4I Jn1jxEuVgSUogFM07dhcHAXJfDLtHCdGE3MpU4cADaxv4= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:x-cbid:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=nRjWNO3HEgayybVbBXyLKnQ8XfGND/PdNnExyp/+pZQNa2RULOaO3cJkRaO5v4 lF3wdhQrLQXVlupnNl9K1/7BXq6NSsFVXjCfLgNlm8/xvVHe2oMdb89ETCbLK8Wr 60xl/02PaOYP78x3ySnDZMIVO6qy8F9xKcvYxEHsOGcm0=; Received: (qmail 28781 invoked by alias); 29 Dec 2011 21:17:28 -0000 Received: (qmail 28773 invoked by uid 22791); 29 Dec 2011 21:17:28 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from e37.co.us.ibm.com (HELO e37.co.us.ibm.com) (32.97.110.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Dec 2011 21:17:15 +0000 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Dec 2011 14:17:13 -0700 Received: from d03relay03.boulder.ibm.com (9.17.195.228) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 29 Dec 2011 14:16:28 -0700 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBTLGRe2142982 for ; Thu, 29 Dec 2011 14:16:27 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBTLGPGM023140 for ; Thu, 29 Dec 2011 14:16:26 -0700 Received: from ibm-tiger.the-meissners.org ([9.33.37.223]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pBTLGOxs022988; Thu, 29 Dec 2011 14:16:24 -0700 Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 88132444B5; Thu, 29 Dec 2011 16:16:22 -0500 (EST) Date: Thu, 29 Dec 2011 16:16:22 -0500 From: Michael Meissner To: Richard Henderson , Michael Meissner , Chung-Lin Tang , gcc-patches , David Edelsohn Subject: Re: [PATCH] PowerPC section type conflict (created PR 51623) Message-ID: <20111229211622.GA309@ibm-tiger.the-meissners.org> Mail-Followup-To: Michael Meissner , Richard Henderson , Chung-Lin Tang , gcc-patches , David Edelsohn References: <4EEB2886.6040108@codesourcery.com> <4EEBC463.1090802@redhat.com> <4EED89EF.1050207@codesourcery.com> <4EEE3C76.3010204@redhat.com> <4EEF5C1F.2020107@codesourcery.com> <20111228173957.GA23383@ibm-tiger.the-meissners.org> <4EFB7D51.1090301@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4EFB7D51.1090301@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) x-cbid: 11122921-7408-0000-0000-000001907CCB X-IsSubscribed: yes 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 On Wed, Dec 28, 2011 at 12:34:25PM -0800, Richard Henderson wrote: > On 12/28/2011 09:39 AM, Michael Meissner wrote: > > && in_section != text_section > > - && !unlikely_text_section_p (in_section) > > + && (in_section && (in_section->common.flags & SECTION_CODE)) == 0 > > You should be able to delete the text_section test as well, > and in_section should *never* be null, when emitting data. > > Otherwise this looks much better to me. In talking to David, I convinced myself that initialized pointers should never be in the text section (switch statements use relative pointers, not absolute addresses currently), so I committed this patch on top of the previous one: 2011-12-29 Michael Meissner PR target/51623 * config/rs6000/rs6000.c (rs6000_assemble_integer): Delete check for an initialized pointer being in a text section with -mrelocatable, since it should never happen. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 182730) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -15456,12 +15456,13 @@ rs6000_assemble_integer (rtx x, unsigned { static int recurse = 0; - /* For -mrelocatable, we mark all addresses that need to be fixed up - in the .fixup section. */ + /* For -mrelocatable, we mark all addresses that need to be fixed up in + the .fixup section. Since the TOC section is already relocated, we + don't need to mark it here. We used to skip the text section, but it + should never be valid for relocated addresses to be placed in the text + section. */ if (TARGET_RELOCATABLE && in_section != toc_section - && in_section != text_section - && (in_section && (in_section->common.flags & SECTION_CODE)) == 0 && !recurse && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE