This is the mail archive of the 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: Commit: Patch: GAS: Fix DWARF line number generation for target that use linker relaxation

Hi Alan,

There was a thinko in my proposed patch. Here is a fixed version which passes the correct argument to MD_APPLY_SYM_VALUE. Does this version meet your expectations ?


Index: gas/write.c
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.150
diff -u -3 -p -r1.150 write.c
--- gas/write.c	28 Jun 2012 11:31:13 -0000	1.150
+++ gas/write.c	29 Jun 2012 12:53:08 -0000
@@ -1004,12 +1004,7 @@ fixup_segment (fixS *fixP, segT this_seg
 	      fixP->fx_subsy = NULL;
 	      fixP->fx_pcrel = 1;
-	  else if (TC_VALIDATE_FIX_SUB (fixP, add_symbol_segment))
-	    /* If the fix is valid, subtract fx_subsy here.  The addition of
-	       fx_addsy will be performed below.  Doing this prevents bogus
-	       warnings from the range check below.  */
-	      add_number -= S_GET_VALUE (fixP->fx_subsy);
-	  else
+	  else if (! TC_VALIDATE_FIX_SUB (fixP, add_symbol_segment))
 	      if (!md_register_arithmetic
 		  && (add_symbol_segment == reg_section
@@ -1024,6 +1019,8 @@ fixup_segment (fixS *fixP, segT this_seg
 			      S_GET_NAME (fixP->fx_subsy),
 			      segment_name (sub_symbol_segment));
+	  else if (MD_APPLY_SYM_VALUE (fixP))
+	    add_number -= S_GET_VALUE (fixP->fx_subsy);

if (fixP->fx_addsy)

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