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,

> So I think the correct solution is to
apply the fx_subsy values depending on MD_APPLY_SYM_VALUE, just as we
do for fx_addsy.

Ah, something like this then ?


Cheers
  Nick

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 07:41:29 -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->fx_subsy))
+           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]