PR ld/12614
authorAlan Modra <amodra@gmail.com>
Thu, 28 Apr 2011 15:29:42 +0000 (15:29 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 28 Apr 2011 15:29:42 +0000 (15:29 +0000)
* emultempl/pe.em (_after_open): Correctly check whether symbol is
in undef list.

ld/ChangeLog
ld/emultempl/pe.em

index dfbb58219dbbdcd90b6a9889255911e06d0a5012..a9c5ee43608c96e077aff27645370be64921d0d0 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-28  Daniel C. Klauer  <daniel.c.klauer@web.de>
+
+       PR ld/12614
+       * emultempl/pe.em (_after_open): Correctly check whether symbol is
+       in undef list.
+
 2011-04-26  Kai Tietz  <ktietz@redhat.com>
 
        * scripttempl/pe.sc: Handle .eh_frame($|.)* sections.
index b8290b3435bf3e02794f3600c48a671d9d625d21..6369606e2a564edd9b00ddc3c61f76516d866b1e 100644 (file)
@@ -1590,8 +1590,10 @@ gld_${EMULATION_NAME}_after_open (void)
                        /* If the symbol in the stub section has no other
                           undefined references, exclude the stub section
                           from the final link.  */
-                       if (blhe && (blhe->type == bfd_link_hash_defined)
-                           && (blhe->u.undef.next == NULL))
+                       if (blhe != NULL
+                           && blhe->type == bfd_link_hash_defined
+                           && blhe->u.undef.next == NULL
+                           && blhe != link_info.hash->undefs_tail)
                          stub_sec->flags |= SEC_EXCLUDE;
                      }
                  }
This page took 0.034516 seconds and 4 git commands to generate.