summaryrefslogtreecommitdiff
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
commit76829e11e4be58aceeca0b70f8a3cf2c921e133f (patch)
tree16c46deb31422c3afadadf998e68b6ab0903c969 /bfd
parenta9d5aff1a6611611a8a174c96d1ab42d36bda777 (diff)
downloadgdb-76829e11e4be58aceeca0b70f8a3cf2c921e133f.tar.gz
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 bd2d1f5eef7..a776d87d4cd 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 07698267520..9d66243478c 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