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

David Edelsohn dje@watson.ibm.com
Sat Nov 29 04:06:00 GMT 2003


>>>>> Alan Modra writes:

Alan> See the thread starting with
Alan> http://gcc.gnu.org/ml/gcc-patches/2003-10/msg01516.html

	Okay, how about the following patch.

David

Index: eabi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/eabi.h,v
retrieving revision 1.11
diff -c -p -r1.11 eabi.h
*** eabi.h	10 Jun 2003 16:01:39 -0000	1.11
--- eabi.h	29 Nov 2003 04:03:02 -0000
***************
*** 55,57 ****
--- 55,60 ----
  #define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
  #define TARGET_ISEL rs6000_isel
  #define TARGET_FPRS (!rs6000_float_gprs)
+ 
+ /* Generate entries in .fixup for relocatable addresses.  */
+ #define RELOCATABLE_NEEDS_FIXUP
Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.550
diff -c -p -r1.550 rs6000.c
*** rs6000.c	14 Nov 2003 20:05:34 -0000	1.550
--- rs6000.c	29 Nov 2003 04:03:02 -0000
*************** toc_section (void)
*** 14991,15002 ****
  static unsigned int
  rs6000_elf_section_type_flags (tree decl, const char *name, int reloc)
  {
!   unsigned int flags
!     = default_section_type_flags_1 (decl, name, reloc,
! 				    flag_pic || DEFAULT_ABI == ABI_AIX);
! 
    if (TARGET_RELOCATABLE)
!     flags |= SECTION_WRITE;
  
    return flags;
  }
--- 14991,15006 ----
  static unsigned int
  rs6000_elf_section_type_flags (tree decl, const char *name, int reloc)
  {
!   int rw_relocs = flag_pic || DEFAULT_ABI == ABI_AIX;
!   unsigned int flags;
!   
! #ifdef RELOCATABLE_NEEDS_FIXUP
    if (TARGET_RELOCATABLE)
!     rw_relocs = 1;
! #endif
! 
!   flags = default_section_type_flags_1 (decl, name, reloc,
! 					flag_pic || DEFAULT_ABI == ABI_AIX);
  
    return flags;
  }
Index: sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.142
diff -c -p -r1.142 sysv4.h
*** sysv4.h	18 Nov 2003 12:56:44 -0000	1.142
--- sysv4.h	29 Nov 2003 04:03:02 -0000
*************** ncrtn.o%s"
*** 1346,1351 ****
  #define TARGET_ASM_EXCEPTION_SECTION readonly_data_section
  
  #define DOUBLE_INT_ASM_OP "\t.quad\t"
- 
- /* Generate entries in .fixup for relocatable addresses.  */
- #define RELOCATABLE_NEEDS_FIXUP
--- 1346,1348 ----



More information about the Binutils mailing list