PR ld/11583
authorAlan Modra <amodra@gmail.com>
Fri, 14 May 2010 03:15:20 +0000 (03:15 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 14 May 2010 03:15:20 +0000 (03:15 +0000)
* ldexp.c (exp_fold_tree_1): If assignment source expression is
invalid, make the destination symbol undefined.

ld/ChangeLog
ld/ldexp.c

index 7fa12d771c340802f258072e23323bbdbeddbfb1..ca76b05165220916653a3d9bc8b56931d485dbf8 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-14  Alan Modra  <amodra@gmail.com>
+
+       PR ld/11583
+       * ldexp.c (exp_fold_tree_1): If assignment source expression is
+       invalid, make the destination symbol undefined.
+
 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
 
        * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
index 7fdf7f40587d16bd0ff6f98f5f446c3c2a725a7d..34d9eabde7f67506d79f54afdcdc262b194d7b30 100644 (file)
@@ -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;