From: Alan Modra Date: Thu, 28 Apr 2011 15:29:42 +0000 (+0000) Subject: PR ld/12614 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0605dbe1c363beecab0c44d6a384c0592d15d93;p=binutils-gdb.git PR ld/12614 * emultempl/pe.em (_after_open): Correctly check whether symbol is in undef list. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index dfbb58219db..a9c5ee43608 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2011-04-28 Daniel C. Klauer + + PR ld/12614 + * emultempl/pe.em (_after_open): Correctly check whether symbol is + in undef list. + 2011-04-26 Kai Tietz * scripttempl/pe.sc: Handle .eh_frame($|.)* sections. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index b8290b3435b..6369606e2a5 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -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; } }