X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fxcofflink.c;h=9d66243478c6d6e95bd913f80497f93947f3565b;hb=86fb1dece37497b267579ed4f062d280cd5760cd;hp=076982675209727985c20a60454e181063fe626b;hpb=e54fdaa5c98411e1874ba00e0b2d08815148ac06;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index 0769826752..9d66243478 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -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