From: Alan Modra Date: Wed, 23 May 2012 04:38:08 +0000 (+0000) Subject: * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89b2bec8ac096eab3b9ec85a4141def240a46071;p=binutils-gdb.git * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle BFDs with multiple .eh_frame sections. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dd15034934f..5fe29dbc2dc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-05-23 Alan Modra + + * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle + BFDs with multiple .eh_frame sections. + 2012-05-23 Alan Modra PR ld/13909 diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 8ec34ab0cab..685540c9107 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -1278,7 +1278,11 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info) /* Count only sections which have at least a single CIE or FDE. There cannot be any CIE or FDE <= 8 bytes. */ o = bfd_get_section_by_name (abfd, ".eh_frame"); - if (o && o->size > 8 && !bfd_is_abs_section (o->output_section)) + while (o != NULL + && (o->size <= 8 + || bfd_is_abs_section (o->output_section))) + o = bfd_get_next_section_by_name (o); + if (o != NULL) break; }