This is the mail archive of the binutils@sourceware.org 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,

+	  else
+	    /* 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);

This looks suspicious to me, as it applies a symbol value without any sort of notification to the backend. This ought to result in the value being subtracted twice, unless the backend is buggy.

Hmm, are you saying that TC_VALIDATE_FIX_SUB ought to modify add_number directly, even though it is not an argument to the macro ?


The problem I was trying to fix was that (for the mn10300-elf toolchain) if TC_VALIDATE_FIX_SUB is invoked then, without my patch, add_number is left unmodified. All the other alternatives in the if-statement from that code block update add_number (unless there is an error), so it seemed the correct thing to do.

Also, without this patch, the mn10300-elf toolchain fails the gas/lns/lns-big-delta test because fixup_segment() erroneously complains that the value 75004 is being written to a 2-byte wide field. The error is bogus because the actual value being written is 0. The value of 75004 is obtained from fixp->fx_addsy, without the value of fixp->fx_subsy being subtracted.

Cheers
  Nick





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