diff options
author | Alan Modra <amodra@bigpond.net.au> | 2011-04-28 15:33:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2011-04-28 15:33:57 +0000 |
commit | 83b54a818c6ee713aebe90af59ad2d14ba281cb6 (patch) | |
tree | 1fd277c1b52e0ef13e632018162831b3fc80f8fd | |
parent | bb3b7c318d9e436d0b3f4a2242f297edf597ab2c (diff) | |
download | binutils-redhat-83b54a818c6ee713aebe90af59ad2d14ba281cb6.tar.gz |
PR ld/12614
* emultempl/pe.em (_after_open): Correctly check whether symbol is
in undef list.
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index c1218b5ac5..37dc6caf25 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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-27 Alan Modra <amodra@gmail.com> Backport from mainline. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 976b622f84..f9085f2fe7 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; } } |