aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-07-21 07:49:58 +0000
committerAlan Modra <amodra@gmail.com>2008-07-21 07:49:58 +0000
commitf60e73e9fc098b5cbf964afa4ccec7d9d8f7ad66 (patch)
tree24fed9e4fb234aa75a4ba3b37a0ad4530dfeeb82 /bfd/elf-eh-frame.c
parentdc1859a6efe9122ab93383ff256aeff62d41e7cb (diff)
downloadgdb-f60e73e9fc098b5cbf964afa4ccec7d9d8f7ad66.zip
gdb-f60e73e9fc098b5cbf964afa4ccec7d9d8f7ad66.tar.gz
gdb-f60e73e9fc098b5cbf964afa4ccec7d9d8f7ad66.tar.bz2
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
unwanted zero terminators.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 087c6b0..9b88499 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -1077,7 +1077,11 @@ _bfd_elf_discard_section_eh_frame
hdr_info = &elf_hash_table (info)->eh_info;
for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
- if (!ent->cie)
+ if (ent->size == 4)
+ /* There should only be one zero terminator, on the last input
+ file supplying .eh_frame (crtend.o). Remove any others. */
+ ent->removed = sec->map_head.s != NULL;
+ else if (!ent->cie)
{
cookie->rel = cookie->rels + ent->reloc_index;
BFD_ASSERT (cookie->rel < cookie->relend