aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2002-04-30 04:32:51 +0000
committerTom Rix <trix@redhat.com>2002-04-30 04:32:51 +0000
commit07b678c0c3408cebd7515a53a9631b5b2610164c (patch)
tree5ab53f40b8895549746f569ea329bfb58813178f /bfd/xcofflink.c
parentbd5f7da29f0330208489a2148658b151e4a393bd (diff)
downloadfsf-binutils-gdb-07b678c0c3408cebd7515a53a9631b5b2610164c.zip
fsf-binutils-gdb-07b678c0c3408cebd7515a53a9631b5b2610164c.tar.gz
fsf-binutils-gdb-07b678c0c3408cebd7515a53a9631b5b2610164c.tar.bz2
Fix a problem with static linking with cross tools.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 0769826..9d66243 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