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: H8300-elf-as DWARF problem preliminary analysis


> Instead of referring to a specific line #, produce a context diff 
> (diff -c3p oldfile newfile).  That way we can see what code 
> is changing
> even if the line numbers do not match up.
> 
Thanks for your time. Here is the change in the patch form. 

*** binutils-2.12/gas/config/tc-h8300.c Thu Jan 24 23:52:06 2002
--- modified/tc-h8300.c Tue Aug 13 12:12:14 2002
*************** tc_gen_reloc (section, fixp)
*** 1643,1648 ****
--- 1643,1653 ----
    rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
    rel->addend = fixp->fx_offset;

+   if (fixp->fx_subsy)
+   {
+       rel->addend -= S_GET_VALUE (fixp->fx_subsy);
+       fixp->fx_subsy = 0;
+   }
    r_type = fixp->fx_r_type;

  #define DEBUG 0


> At the very least you have to verify that the two symbols are in the
> same section.
This check is already there in the tc_gen_reloc(). Please refer the 
follwoing code segment.

$ head -1638 binutils-2.12/gas/config/tc-h8300.c  | tail -10
  if (fixp->fx_addsy && fixp->fx_subsy)
    {
      if ((S_GET_SEGMENT (fixp->fx_addsy) != S_GET_SEGMENT (fixp->fx_subsy))
          || S_GET_SEGMENT (fixp->fx_addsy) == undefined_section)
        {
          as_bad_where (fixp->fx_file, fixp->fx_line,
                        "Difference of symbols in different sections is not
supported");
          return NULL;
        }
    }

Please let me know your views about the patch.

Thanks and Regards
Nitin.


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