diff options
author | Alan Modra <amodra@bigpond.net.au> | 2008-07-21 07:49:58 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2008-07-21 07:49:58 +0000 |
commit | 818d1f9a25bceeb5de3df22181d447adfce6300d (patch) | |
tree | c948882c2be9bdc428ff557bf40ce7e43dc6ecb6 | |
parent | 81aa10d16de939070a3796a5e1ec383d8ef3260e (diff) | |
download | gdb-818d1f9a25bceeb5de3df22181d447adfce6300d.tar.gz |
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
unwanted zero terminators.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf-eh-frame.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f00c73a6c6d..a81993d2cd1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2008-07-21 Alan Modra <amodra@bigpond.net.au> + * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop + unwanted zero terminators. + +2008-07-21 Alan Modra <amodra@bigpond.net.au> + * elf32-spu.c (spu_elf_relocate_section): Expand RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for R_SPU_PPU32 and R_SPU_PPU64 relocations. diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 087c6b0930a..9b88499e486 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 |