diff options
author | Alan Modra <amodra@gmail.com> | 2011-04-28 15:29:42 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-04-28 15:29:42 +0000 |
commit | e0605dbe1c363beecab0c44d6a384c0592d15d93 (patch) | |
tree | 061bf822b1056518dc4bde03f5b27090ffaf44f4 /ld/emultempl/pe.em | |
parent | 0827f9a64f165682062f2dbf37579d797bb01f9d (diff) | |
download | gdb-e0605dbe1c363beecab0c44d6a384c0592d15d93.zip gdb-e0605dbe1c363beecab0c44d6a384c0592d15d93.tar.gz gdb-e0605dbe1c363beecab0c44d6a384c0592d15d93.tar.bz2 |
PR ld/12614
* emultempl/pe.em (_after_open): Correctly check whether symbol is
in undef list.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r-- | ld/emultempl/pe.em | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index b8290b3..6369606 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; } } |