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: PR ld/2655/2657: Incorrrect padding for .eh_frame section


On Fri, May 12, 2006 at 01:54:13PM -0700, H. J. Lu wrote:
> On Fri, May 12, 2006 at 10:05:12AM -0700, H. J. Lu wrote:
> > Hi Richard,
> > 
> > Your patch:
> > 
> > http://sourceware.org/ml/binutils/2004-11/msg00226.html
> > 
> > assumes that CIE/FDE are aligned at the pointer size. But it isn't
> > necessarily true. See
> > 
> > http://sources.redhat.com/bugzilla/show_bug.cgi?id=2657
> > 
> 
> This patch fixes 2 PRs 2655/2657. PR 2655 is a gcc bug
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27576
> 
> PR 2657 is we don't properly shrink CIE/FDE.
> 

It turns out that _bfd_elf_discard_section_eh_frame will always pad
CIE/FDE record to the pointer size boundary since it calls
size_of_output_cie_fde to set the CIE/FDE record size. Even if the next
.eh_frame section is marked for 4 byte alignment, it always will be
aligned at the pointer size. Fixing PR 2657 will also fix PR 2655.
I am enclosing an upated patch and 2 testcases for x86-64.


H.J.

Attachment: bfd-eh-3.patch
Description: Text document

Attachment: ld-test-eh-1.patch
Description: Text document


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