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: ppc64 tls support


I was a bit too eager to kill x@got+offset on ppc64, and broke
x@toc+offset which actually makes sense.  So accept anything and just
kill the @got warning on ppc64.

	* config/tc-ppc.c (ppc_elf_suffix): Undo part of last change so that
	x@toc+off works.

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.65
diff -c -p -r1.65 tc-ppc.c
*** gas/config/tc-ppc.c	4 Feb 2003 14:51:13 -0000	1.65
--- gas/config/tc-ppc.c	6 Feb 2003 01:13:29 -0000
*************** ppc_elf_suffix (str_p, exp_p)
*** 1580,1610 ****
  	  }
  
  	if (!ppc_obj64)
  	  {
! 	    if (exp_p->X_add_number != 0
! 		&& (reloc == (int) BFD_RELOC_16_GOTOFF
! 		    || reloc == (int) BFD_RELOC_LO16_GOTOFF
! 		    || reloc == (int) BFD_RELOC_HI16_GOTOFF
! 		    || reloc == (int) BFD_RELOC_HI16_S_GOTOFF))
! 	      as_warn (_("identifier+constant@got means identifier@got+constant"));
  
! 	    /* Now check for identifier@suffix+constant.  */
! 	    if (*str == '-' || *str == '+')
  	      {
! 		char *orig_line = input_line_pointer;
! 		expressionS new_exp;
! 
! 		input_line_pointer = str;
! 		expression (&new_exp);
! 		if (new_exp.X_op == O_constant)
! 		  {
! 		    exp_p->X_add_number += new_exp.X_add_number;
! 		    str = input_line_pointer;
! 		  }
! 
! 		if (&input_line_pointer != str_p)
! 		  input_line_pointer = orig_line;
  	      }
  	  }
  	*str_p = str;
  
--- 1580,1608 ----
  	  }
  
  	if (!ppc_obj64)
+ 	  if (exp_p->X_add_number != 0
+ 	      && (reloc == (int) BFD_RELOC_16_GOTOFF
+ 		  || reloc == (int) BFD_RELOC_LO16_GOTOFF
+ 		  || reloc == (int) BFD_RELOC_HI16_GOTOFF
+ 		  || reloc == (int) BFD_RELOC_HI16_S_GOTOFF))
+ 	    as_warn (_("identifier+constant@got means identifier@got+constant"));
+ 
+ 	/* Now check for identifier@suffix+constant.  */
+ 	if (*str == '-' || *str == '+')
  	  {
! 	    char *orig_line = input_line_pointer;
! 	    expressionS new_exp;
  
! 	    input_line_pointer = str;
! 	    expression (&new_exp);
! 	    if (new_exp.X_op == O_constant)
  	      {
! 		exp_p->X_add_number += new_exp.X_add_number;
! 		str = input_line_pointer;
  	      }
+ 
+ 	    if (&input_line_pointer != str_p)
+ 	      input_line_pointer = orig_line;
  	  }
  	*str_p = str;
  

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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