This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

ia64 crt files tweek


ia64-aix, like powerpc-aix, does not maintain a fixed link-time
offset between text and data segments.  Thus you cannot use gp-
relative offsets to text data.  In this case it's easy enough
to use pc-relative offsets instead.

Applied to mainline and branch.


r~


        * config/ia64/crtbegin.asm (.fini): Use pc-relative relocs to
        reach .text instead of gp-relative relocs.
        * config/ia64/crtend.asm (.init): Likewise.

Index: crtbegin.asm
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/crtbegin.asm,v
retrieving revision 1.8
diff -c -p -d -r1.8 crtbegin.asm
*** crtbegin.asm	2000/10/04 03:08:49	1.8
--- crtbegin.asm	2001/02/22 22:54:35
***************
*** 1,4 ****
! /* Copyright (C) 2000 Free Software Foundation, Inc.
     Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch>
  
     The GNU C Library is free software; you can redistribute it and/or
--- 1,4 ----
! /* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
     Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch>
  
     The GNU C Library is free software; you can redistribute it and/or
*************** __dso_handle:
*** 71,86 ****
   */
  .section .fini,"ax","progbits"
  	{ .mlx
! 	  movl r2 = @gprel(__do_global_dtors_aux#)
! 	  ;;
  	}
  	{ .mii
! 	  nop.m 0
! 	  add r2 = r2, gp
  	  ;;
! 	  mov b6 = r2
  	}
! 	{ .bbb
  	  br.call.sptk.many b0 = b6
  	  ;;
  	}
--- 71,86 ----
   */
  .section .fini,"ax","progbits"
  	{ .mlx
! 	  movl r2 = @pcrel(__do_global_dtors_aux# - 16)
  	}
  	{ .mii
! 	  mov r3 = ip
  	  ;;
! 	  add r2 = r2, r3
! 	  ;;
  	}
! 	{ .mib
! 	  mov b6 = r2
  	  br.call.sptk.many b0 = b6
  	  ;;
  	}
*************** __dso_handle:
*** 105,110 ****
--- 105,111 ----
  	}
  	{ .mfb
  	  st8 [r2] = r16
+ 	  ;;
  	}
  #endif
  
Index: crtend.asm
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/crtend.asm,v
retrieving revision 1.6
diff -c -p -d -r1.6 crtend.asm
*** crtend.asm	2000/10/04 03:08:49	1.6
--- crtend.asm	2001/02/22 22:54:35
***************
*** 1,4 ****
! /* Copyright (C) 2000 Free Software Foundation, Inc.
     Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch>
  
     The GNU C Library is free software; you can redistribute it and/or
--- 1,4 ----
! /* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
     Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch>
  
     The GNU C Library is free software; you can redistribute it and/or
*************** __DTOR_END__:
*** 41,56 ****
   */
  .section .init,"ax","progbits"
  	{ .mlx
! 	  movl r2 = @gprel(__do_global_ctors_aux#)
! 	  ;;
  	}
  	{ .mii
! 	  nop.m 0
! 	  add r2 = r2, gp
  	  ;;
! 	  mov b6 = r2
  	}
! 	{ .bbb
  	  br.call.sptk.many b0 = b6
  	  ;;
  	}
--- 41,56 ----
   */
  .section .init,"ax","progbits"
  	{ .mlx
! 	  movl r2 = @pcrel(__do_global_ctors_aux# - 16)
  	}
  	{ .mii
! 	  mov r3 = ip
  	  ;;
! 	  add r2 = r2, r3
! 	  ;;
  	}
! 	{ .mib
! 	  mov b6 = r2
  	  br.call.sptk.many b0 = b6
  	  ;;
  	}


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