diff options
author | Alan Modra <amodra@bigpond.net.au> | 2010-05-14 03:15:19 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2010-05-14 03:15:19 +0000 |
commit | 73c3ca586b32e0a987260f5ef33c9375118932de (patch) | |
tree | ce889e86ad70eed5ae76d936493b058c60c071f7 /ld/ldexp.c | |
parent | 88b7cc0e621b5a1727b600e74b45b239239c3296 (diff) | |
download | binutils-redhat-73c3ca586b32e0a987260f5ef33c9375118932de.tar.gz |
PR ld/11583
* ldexp.c (exp_fold_tree_1): If assignment source expression is
invalid, make the destination symbol undefined.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r-- | ld/ldexp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c index 7fdf7f4058..34d9eabde7 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -830,6 +830,14 @@ exp_fold_tree_1 (etree_type *tree) hsrc); } } + else if (expld.phase == lang_final_phase_enum) + { + h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst, + FALSE, FALSE, TRUE); + if (h != NULL + && h->type == bfd_link_hash_new) + h->type = bfd_link_hash_undefined; + } } break; |