* Makefile.am (libbfd.h): Add "Extracted from.." comment.
[deliverable/binutils-gdb.git] / bfd / xcofflink.c
index 076982675209727985c20a60454e181063fe626b..9d66243478c6d6e95bd913f80497f93947f3565b 100644 (file)
@@ -1778,12 +1778,19 @@ xcoff_link_add_symbols (abfd, info)
          if (info->hash->creator == abfd->xvec)
            {
              if (! bfd_is_und_section (section))
-               *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info),
-                                                   name, true, copy, false);
+               {
+                 *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info),
+                                                     name, true, copy, false);
+               }
              else
-               *sym_hash = ((struct xcoff_link_hash_entry *)
-                            bfd_wrapped_link_hash_lookup (abfd, info, name,
-                                                          true, copy, false));
+               {
+                 /* Make a copy of the symbol name to prevent problems with
+                    merging symbols.  */
+                 *sym_hash = ((struct xcoff_link_hash_entry *)
+                              bfd_wrapped_link_hash_lookup (abfd, info, name,
+                                                            true, true, 
+                                                            false));
+               }
              if (*sym_hash == NULL)
                goto error_return;
              if (((*sym_hash)->root.type == bfd_link_hash_defined
This page took 0.026347 seconds and 4 git commands to generate.