diff options
author | Alan Modra <amodra@gmail.com> | 2012-05-22 12:09:26 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-05-22 12:09:26 +0000 |
commit | 90061c3348116fbc64c9ef19dc28c154450d218e (patch) | |
tree | 15133347a508e842b514ed9829d35af6b3dab5cd /bfd/elflink.c | |
parent | 43011e5218454a59f78d74380b5072fa5e564645 (diff) | |
download | gdb-90061c3348116fbc64c9ef19dc28c154450d218e.zip gdb-90061c3348116fbc64c9ef19dc28c154450d218e.tar.gz gdb-90061c3348116fbc64c9ef19dc28c154450d218e.tar.bz2 |
* elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
sections attached to a BFD.
* section.c (bfd_get_section_by_name): Rewrite description.
(bfd_get_next_section_by_name): New function.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 3614575..42f27a0 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -12522,8 +12522,8 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info) fini_reloc_cookie_rels (&cookie, stab); } - if (eh != NULL - && init_reloc_cookie_rels (&cookie, info, abfd, eh)) + while (eh != NULL + && init_reloc_cookie_rels (&cookie, info, abfd, eh)) { _bfd_elf_parse_eh_frame (abfd, info, eh, &cookie); if (_bfd_elf_discard_section_eh_frame (abfd, info, eh, @@ -12531,6 +12531,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info) &cookie)) ret = TRUE; fini_reloc_cookie_rels (&cookie, eh); + eh = bfd_get_next_section_by_name (eh); } if (bed->elf_backend_discard_info != NULL |