summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2012-05-22 12:09:24 +0000
committerAlan Modra <amodra@bigpond.net.au>2012-05-22 12:09:24 +0000
commit86a6d3fd8633674aac2c8411722a8955b3e14d75 (patch)
tree9c3420af96b7f0baa21ab6ba3236a2539cc018c6 /bfd/elflink.c
parent5a4148aa6516173edf7b3378a39a99ae6ba950f8 (diff)
downloadgdb-86a6d3fd8633674aac2c8411722a8955b3e14d75.tar.gz
* 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 3614575d23d..42f27a00f75 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