Remove .eh_frame zero terminators
H.J. Lu
hjl.tools@gmail.com
Thu Aug 31 10:50:00 GMT 2017
On Thu, Aug 31, 2017 at 3:35 AM, Alan Modra <amodra@gmail.com> wrote:
> The machinery to do this was there, but not enabled if the terminator
> was the only thing in the section.
>
> We should have seen quite a lot of exception handling failures due to
> ld's nasty LTO support. It has the habit of adding object files
> extracted from archives after crtend.o, the file that has the
> .eh_frame terminator. The saving grace is that with --eh-frame-hdr
> there doesn't need to be a scan of section contents (which would
> terminate on hitting the terminator) for an FDE covering a given
> address.
>
> bfd/
> * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
> for a section containing just a terminator. Allow multiple
> terminators at end of section.
> * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
> sections when not adding alignment. Assert on terminator in
> the middle of FDEs.
> ld/
> * testsuite/ld-elf/eh3.d: Update.
> * testsuite/ld-elf/eh4.d: Update.
>
I am checking in this to add a testcase.
Thanks.
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-test-for-PR-ld-22048.patch
Type: text/x-patch
Size: 2595 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170831/5f44d5ea/attachment.bin>
More information about the Binutils
mailing list