This is the mail archive of the
mailing list for the binutils project.
How to get the padding size for the next section?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Thu, 11 May 2006 22:39:50 -0700
- Subject: How to get the padding size for the next section?
We don't handle .eh_frame section padding properly:
When we pad the current .eh_frame section for the alignment of the
next .eh_frame section, we need to know the padding size. Otherwise,
the last FDE size may be wrong. Currently, we assume that all .eh_frame
sections have the same alignment. It isn't true for x86-64 since
the .eh_frame section in crtend.o from gcc has 4 byte alignment.
Ideally, _bfd_elf_write_section_eh_frame knows the real alignment of
the next .eh_frame section. But this info is hard to come by.
A kludge may be to force 8 byte alignment on .eh_frame for x86-64
when we see a 4 byte alignment.