This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ppc problem with .rodata.str1.4. binutils requirement for gcc 3.3.1?
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Kris Warkentin <kewarken at qnx dot com>, Gcc ML <gcc at gcc dot gnu dot org>, binutils at sources dot redhat dot com
- Date: Fri, 28 Nov 2003 21:32:25 -0500
- Subject: Re: ppc problem with .rodata.str1.4. binutils requirement for gcc 3.3.1?
- References: <087e01c3b5da$77d658e0$0202040a@catdog> <20031129014255.GT2508@bubble.sa.bigpond.net.au>
>>>>> 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