PATCH: Re: EH frame optimization bug

Jakub Jelinek jakub@redhat.com
Fri Oct 3 07:22:00 GMT 2003


On Thu, Oct 02, 2003 at 10:36:42PM -0700, H. J. Lu wrote:
> On Thu, Oct 02, 2003 at 09:57:31PM -0400, Daniel Jacobowitz wrote:
> > > > > 
> > > > > Something similar came up a few months ago but I can't find the reference
> > > > > now.  What's the right thing to do here?  My instinct says, grow the last
> > > > > FDE before the padding, but I have no idea how to do that.  Is the alignment
> > > > > of a .eh_frame section mandated?
> > > > 
> > > 
> > > How about this patch?
> > 
> > It seems reasonable, but I'd have thought that it would be safer/more
> > useful to ignore old_fill.
> > 
> 
> Like this?

Well, the primary thing is that for .eh_frame (as opposed to .debug_frame)
unless some FDE/CIE uses somewhere DW_EH_PE_aligned encoding or unless
GCC 2.x style FDE/CIEs are present I don't see why there should be any
padding in the .eh_frame section.
So IMHO if ld detects there are no such things in the .eh_frame section
(or even better just that the following CIE/FDE doesn't really need to be
aligned), it should remove any padding.

	Jakub



More information about the Binutils mailing list