PR ld/11384
[deliverable/binutils-gdb.git] / ld / ldexp.c
index 2d0382815f1e5b333294bb90f1195e2b6f0040eb..7fdf7f40587d16bd0ff6f98f5f446c3c2a725a7d 100644 (file)
@@ -815,6 +815,20 @@ exp_fold_tree_1 (etree_type *tree)
              h->u.def.section = expld.result.section;
              if (tree->type.node_class == etree_provide)
                tree->type.node_class = etree_provided;
+
+             /* Copy the symbol type if this is a simple assignment of
+                one symbol to annother.  */
+             if (tree->assign.src->type.node_class == etree_name)
+               {
+                 struct bfd_link_hash_entry *hsrc;
+
+                 hsrc = bfd_link_hash_lookup (link_info.hash,
+                                              tree->assign.src->name.name,
+                                              FALSE, FALSE, TRUE);
+                 if (hsrc)
+                   bfd_copy_link_hash_symbol_type (link_info.output_bfd, h,
+                                                   hsrc);
+               }
            }
        }
       break;
This page took 0.022824 seconds and 4 git commands to generate.