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


In message <E04CF3F88ACBD5119EFE00508BBB212103F20216@exch-01.noida.hcltech.com>
, "Nitin Gupta, Noida" writes:
 >
 >> 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.
Thanks.  

Thinking more about this, why wasn't this fixup simplified?

ie, the generic parts of gas know how to simplify a fixup involving
the difference of two symbols in the same segment.

I think the answer is that we don't do fixup simplifications on parts
where the linker is going to potentially relax the segment (shrink
the segment).

You might look look at defining TC_LINKRELAX_FIXUP since I believe the
fixup you need simplified is in a debugging section.  I believe you
can find a suitable example in tc-mn10300.c.


jeff


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