PR ld/13909
authorAlan Modra <amodra@gmail.com>
Fri, 25 May 2012 01:13:59 +0000 (01:13 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 25 May 2012 01:13:59 +0000 (01:13 +0000)
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
multiple .eh_frame sections attached to bfd.

ld/ChangeLog
ld/emultempl/elf32.em

index 38dfb2457fd86de5bf698633636be158aa415966..d9cf5905bc5dae5b636e59c7cd0cc0c939111cfd 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-25  Alan Modra  <amodra@gmail.com>
+
+       PR ld/13909
+       * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
+       multiple .eh_frame sections attached to bfd.
+
 2012-05-23  Cary Coutant  <ccoutant@google.com>
 
        * scripttempl/armbpabi.sc: Match .data.rel.ro.* sections more
index aab1c6d8e6445961ce73455c5636b72aa733c486..2b7a352a08cad2ebe4c1ef747ed3b781cd19d09c 100644 (file)
@@ -1142,10 +1142,11 @@ gld${EMULATION_NAME}_after_open (void)
          if (!warn_eh_frame)
            {
              s = bfd_get_section_by_name (abfd, ".eh_frame");
-             warn_eh_frame
-               = (s
-                  && s->size > 8
-                  && !bfd_is_abs_section (s->output_section));
+             while (s != NULL
+                    && (s->size <= 8
+                        || bfd_is_abs_section (s->output_section)))
+               s = bfd_get_next_section_by_name (s);
+             warn_eh_frame = s != NULL;
            }
          if (elfbfd && warn_eh_frame)
            break;