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: dwarf2 and linker relaxation problem


On Wed, Sep 07, 2005 at 10:41:49AM +0400, Dmitry Diky wrote:
>   Special opcode 90: advance Address by 6 to 0x4814001c and Line by 1 to 21  
> <- relaxed insn is here.
>   Special opcode 34: advance Address by 2 to 0x4814001e and Line by 1 to 22
>  
> So, if the code 90 will be changed properly, everything should be Ok. Am I 
> correct?

>From your picture I would have expected the following code 34 to change.

As long as the address displacement only decreases during relaxation, 
then you can find a replacement special opcode that will match the new
address displacement and the old line number displacement.

If your relaxation ever adds bytes, then the correction may need to add
new bytes to the .debug_line section to represent the change, at which
point you may have to re-encode the entire section.

If all of this is too difficult, then we can add an internal flag to the
assembler that limits the encoding of .debug_line to DW_LNS_fixed_advance_pc, 
which would involve a fixed length 16-bit displacement; presumably you
have a relocation for that.


r~


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