ld -r abort in _bfd_elf_write_section_eh_frame
authorAlan Modra <amodra@gmail.com>
Tue, 11 Nov 2014 09:43:03 +0000 (20:13 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 11 Nov 2014 10:07:00 +0000 (20:37 +1030)
commit3021627171f94b9023b4ccb56a01df7f0660f8ee
tree858b36e5879edf9018536b17599c737ac004dcdb
parent902781d6ebc466a41839018405705b02385b1966
ld -r abort in _bfd_elf_write_section_eh_frame

Turning on .eh_frame processing for ld -r resulted in systemtap
tickling a ld bug.  Triggered by the zero terminator not being added
to .eh_frame in a separate file as it usually is (crtend.o), but
instead being present in the last .eh_frame section along with CIEs
and FDEs.  The 4-byte terminator makes the section size check fail
on 64-bit targets.

* elf-eh-frame (_bfd_elf_write_section_eh_frame): Adjust section
size check to account for possible zero terminator.
bfd/ChangeLog
bfd/elf-eh-frame.c