This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ppc problem with .rodata.str1.4. binutils requirement for gcc 3.3.1?


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]