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]

PATCH: Fix ia64 subtractions of symbols in different sections


This one fixes "ld-elf/merge". See

http://sources.redhat.com/ml/binutils/2001-02/msg00625.html


H.J.
-----
2002-12-05  H.J. Lu <hjl@gnu.org>

	* config/tc-ia64.c (md_apply_fix3): Remove the PCREL hack
	copied from tc-i386.c.

--- gas/config/tc-ia64.c.rela	Thu Dec  5 19:43:56 2002
+++ gas/config/tc-ia64.c	Thu Dec  5 20:20:47 2002
@@ -10397,7 +10397,6 @@ md_apply_fix3 (fix, valP, seg)
 {
   char *fixpos;
   valueT value = *valP;
-  int adjust = 0;
 
   fixpos = fix->fx_frag->fr_literal + fix->fx_where;
 
@@ -10407,22 +10406,18 @@ md_apply_fix3 (fix, valP, seg)
 	{
 	case BFD_RELOC_IA64_DIR32MSB:
 	  fix->fx_r_type = BFD_RELOC_IA64_PCREL32MSB;
-	  adjust = 1;
 	  break;
 
 	case BFD_RELOC_IA64_DIR32LSB:
 	  fix->fx_r_type = BFD_RELOC_IA64_PCREL32LSB;
-	  adjust = 1;
 	  break;
 
 	case BFD_RELOC_IA64_DIR64MSB:
 	  fix->fx_r_type = BFD_RELOC_IA64_PCREL64MSB;
-	  adjust = 1;
 	  break;
 
 	case BFD_RELOC_IA64_DIR64LSB:
 	  fix->fx_r_type = BFD_RELOC_IA64_PCREL64LSB;
-	  adjust = 1;
 	  break;
 
 	default:
@@ -10457,11 +10452,6 @@ md_apply_fix3 (fix, valP, seg)
 	default:
 	  break;
 	}
-
-      /* ??? This is a hack copied from tc-i386.c to make PCREL relocs
-	 work.  There should be a better way to handle this.  */
-      if (adjust)
-	fix->fx_offset += fix->fx_where + fix->fx_frag->fr_address;
     }
   else if (fix->tc_fix_data.opnd == IA64_OPND_NIL)
     {


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