From: Alan Modra Date: Thu, 28 Apr 2011 15:33:57 +0000 (+0000) Subject: PR ld/12614 X-Git-Tag: binutils-2_21_1~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af8583fdc63fe43b5a5c7537b14815356a1076f9;p=thirdparty%2Fbinutils-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 c1218b5ac5b..37dc6caf25d 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-27 Alan Modra Backport from mainline. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 976b622f84c..f9085f2fe76 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1588,8 +1588,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; } }