From 90061c3348116fbc64c9ef19dc28c154450d218e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 22 May 2012 12:09:26 +0000 Subject: * 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. --- bfd/elflink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bfd/elflink.c') 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 -- cgit v1.1