From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12072 invoked by alias); 29 Nov 2003 02:33:04 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 12061 invoked from network); 29 Nov 2003 02:33:03 -0000 Received: from unknown (HELO igw2.watson.ibm.com) (129.34.20.6) by sources.redhat.com with SMTP; 29 Nov 2003 02:33:03 -0000 Received: from sp1n293en1.watson.ibm.com (sp1n293en1.watson.ibm.com [9.2.112.57]) by igw2.watson.ibm.com (8.11.7-20030924/8.11.4) with ESMTP id hAT2WVC58950; Fri, 28 Nov 2003 21:32:32 -0500 Received: from makai.watson.ibm.com (localhost [127.0.0.1]) by sp1n293en1.watson.ibm.com (8.11.7-20030924/8.11.7) with ESMTP id hAT2WVR65016; Fri, 28 Nov 2003 21:32:31 -0500 Received: from makai.watson.ibm.com (localhost [127.0.0.1]) by makai.watson.ibm.com (AIX5.1/8.11.6p2/8.11.0/03-06-2002) with ESMTP id hAT2WPT28318; Fri, 28 Nov 2003 21:32:30 -0500 Message-Id: <200311290232.hAT2WPT28318@makai.watson.ibm.com> To: Kris Warkentin , Gcc ML , binutils@sources.redhat.com Subject: Re: ppc problem with .rodata.str1.4. binutils requirement for gcc 3.3.1? In-Reply-To: Message from Alan Modra of "Sat, 29 Nov 2003 12:12:55 +1030." <20031129014255.GT2508@bubble.sa.bigpond.net.au> References: <087e01c3b5da$77d658e0$0202040a@catdog> <20031129014255.GT2508@bubble.sa.bigpond.net.au> Date: Sat, 29 Nov 2003 02:33:00 -0000 From: David Edelsohn X-SW-Source: 2003-11/txt/msg00501.txt.bz2 >>>>> Alan Modra writes: Alan> This is very likely a bug in gcc. I reckon that if you look at your Alan> object file with readelf or objdump, you'll find that this .rodata Alan> section is marked read/write. Alan> The fix is easy. Alan> --- gcc-ppc64-33.orig/gcc/config/rs6000/rs6000.c 2003-09-27 10:07:41.000000000 +0930 Alan> +++ gcc-ppc64-33/gcc/config/rs6000/rs6000.c 2003-11-29 12:04:22.000000000 +1030 Alan> @@ -13138,14 +13659,8 @@ rs6000_elf_section_type_flags (decl, nam Alan> const char *name; Alan> int reloc; Alan> { Alan> - unsigned int flags Alan> - = default_section_type_flags_1 (decl, name, reloc, Alan> - flag_pic || DEFAULT_ABI == ABI_AIX); Alan> - Alan> - if (TARGET_RELOCATABLE) Alan> - flags |= SECTION_WRITE; Alan> - Alan> - return flags; Alan> + return default_section_type_flags_1 (decl, name, reloc, Alan> + flag_pic || DEFAULT_ABI == ABI_AIX); Alan> } Alan> /* Record an element in the table of global constructors. SYMBOL is I am not sure that we can make this change unilaterally. The addition of the SECTION_WRITE flag may be necessary for embedded targets. We need to understand the reason for the feature before removing it. David