aboutsummaryrefslogtreecommitdiff
path: root/bfd
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
parentbd5f7da29f0330208489a2148658b151e4a393bd (diff)
downloadgdb-07b678c0c3408cebd7515a53a9631b5b2610164c.zip
gdb-07b678c0c3408cebd7515a53a9631b5b2610164c.tar.gz
gdb-07b678c0c3408cebd7515a53a9631b5b2610164c.tar.bz2
Fix a problem with static linking with cross tools.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/xcofflink.c17
2 files changed, 17 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bd2d1f5..a776d87 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-30 Tom Rix <trix@redhat.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
+ symbol names into the hash table.
+
2002-04-28 Tom Rix <trix@redhat.com>
* coff-rs6000.c (xcoff_calculate_relocation) : Function table for
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