From gcc-patches-return-66634-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org Thu Aug 22 01:52:23 2002 Return-Path: Delivered-To: listarch-gcc-patches at gcc dot gnu dot org Received: (qmail 3823 invoked by alias); 22 Aug 2002 01:52:21 -0000 Mailing-List: contact gcc-patches-help at gcc dot gnu dot org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner at gcc dot gnu dot org Delivered-To: mailing list gcc-patches at gcc dot gnu dot org Received: (qmail 3815 invoked from network); 22 Aug 2002 01:52:19 -0000 Received: from unknown (HELO mta03ps.bigpond.com) (144.135.25.135) by sources dot redhat dot com with SMTP; 22 Aug 2002 01:52:19 -0000 Received: from bubble.local ([144.135.25.72]) by mta03ps dot bigpond dot com (Netscape Messaging Server 4 dot 15 mta03ps May 23 2002 23:53:28) with SMTP id H182J400 dot BVF for ; Thu, 22 Aug 2002 11:52:16 +1000 Received: from CPE-144-136-184-138.sa.bigpond.net.au ([144.136.184.138]) by PSMAM02.mailsvc.email.bigpond.com(MailRouter V3.0n 80/4740287); 22 Aug 2002 11:52:16 Received: (qmail 2029 invoked by uid 179); 22 Aug 2002 01:52:15 -0000 Date: Thu, 22 Aug 2002 11:22:15 +0930 From: Alan Modra To: David Edelsohn Cc: Geoff Keating , gcc-patches at gcc dot gnu dot org Subject: Re: [RFC] PowerPC select_section / unique_section Message-ID: <20020822112215.Q21053@bubble.sa.bigpond.net.au> Mail-Followup-To: David Edelsohn , Geoff Keating , gcc-patches at gcc dot gnu dot org References: <200208211720.NAA26564@makai.watson.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200208211720 dot NAA26564 at makai dot watson dot ibm dot com>; from dje at watson dot ibm dot com on Wed, Aug 21, 2002 at 01:20:18PM -0400 On Wed, Aug 21, 2002 at 01:20:18PM -0400, David Edelsohn wrote: > * config/rs6000/rs6000.c (rs6000_elf_select_section): Treat > DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly > default. > (rs6000_elf_unique_section): Treat DEFAULT_ABI == ABI_AIX like > PIC. > (rs6000_xcoff_select_section): Update to recent readonly > algorithm. Why not use decl_readonly_section? rs6000_elf_select_section ends up looking like: needs_sdata = (size > 0 && size <= g_switch_value && rs6000_sdata != SDATA_NONE && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl))); readonly = 0; if (!needs_sdata || rs6000_sdata == SDATA_EABI) readonly = decl_readonly_section (decl, reloc); (*sec_funcs[(readonly ? 0 : 2) + (needs_sdata ? 1 : 0)])(); Similarly for the other functions. I've used this on gcc-3.2 based powerpc64-linux for a couple of weeks. Patch available on request. -- Alan Modra IBM OzLabs - Linux Technology Centre