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: [PATCH] Fix .cfi_* directive skip over >= 64KB (PR gas/10255)


On Tue, Jun 09, 2009 at 06:41:36AM -0700, H.J. Lu wrote:
> On Tue, Jun 9, 2009 at 6:32 AM, Jakub Jelinek<jakub@redhat.com> wrote:
> > On Tue, Jun 09, 2009 at 06:27:37AM -0700, H.J. Lu wrote:
> >> > I don't think a memory write is something we should try hard to avoid, what
> >> > matters how it is maintanable. ?IMHO leaving the fragment uninitialized
> >> > is a bad idea, but doing what you wrote above in eh_frame_convert_frag
> >>
> >> It is uninitialized because we don't know what we will put in there.
> >> If we want to initialize it, I think it should be initialized to something
> >> invalid and verify it is valid when we output it. Otherwise, initialize
> >> it may still generate bad output.
> >
> > I don't understand it. ?We generate DW_CFA_advance_loc4 by default, and if
> > possible optimize it to something shorter. ?So DW_CFA_advance_loc4 is the
> > right default...
> >
> 
> That is true only because of the logic in  eh_frame_convert_frag.

That logic comes from the original rs_cfa use, to optimize
DW_CFA_advance_loc4 in compiler written .eh_frame and for that case
it is very reasonable to assume that the byte before it is
DW_CFA_advance_loc4, because the optimization doesn't happen for other
opcodes.  When dw2gencfi.c started using it, it should IMHO just do what is
needed to set it up the same as hand writte .eh_frame does.

	Jakub


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