aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-01-11 19:38:06 +0000
committerIan Lance Taylor <ian@airs.com>1995-01-11 19:38:06 +0000
commit040c913e184f7bc47f105edebde6bcbc9a55f69b (patch)
treebc694dde44621f672c3af6f5c7c8d67ffcaafab0 /bfd
parentb47ae8fb931c6466e152abdb33288a78e7fc2f1c (diff)
downloadgdb-040c913e184f7bc47f105edebde6bcbc9a55f69b.zip
gdb-040c913e184f7bc47f105edebde6bcbc9a55f69b.tar.gz
gdb-040c913e184f7bc47f105edebde6bcbc9a55f69b.tar.bz2
* linker.c (_bfd_generic_link_add_one_symbol): Ignore
redefinitions of an absolute symbol to the same value. PR 6159.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/linker.c13
2 files changed, 17 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8d8d3f9..213aaea 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 11 14:36:41 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * linker.c (_bfd_generic_link_add_one_symbol): Ignore
+ redefinitions of an absolute symbol to the same value.
+
Mon Jan 9 15:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* elfcode.h (elf_link_add_object_symbols): It's reasonable for no
diff --git a/bfd/linker.c b/bfd/linker.c
index 7606534..37ab1c8 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -867,6 +867,9 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
if (! bfd_has_map (abfd))
{
+ /* An empty archive is a special case. */
+ if (bfd_openr_next_archived_file (abfd, (bfd *) NULL) == NULL)
+ return true;
bfd_set_error (bfd_error_no_symbols);
return false;
}
@@ -1639,7 +1642,15 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
default:
abort ();
}
-
+
+ /* Ignore a redefinition of an absolute symbol to the same
+ value; it's harmless. */
+ if (h->type == bfd_link_hash_defined
+ && bfd_is_abs_section (msec)
+ && bfd_is_abs_section (section)
+ && value == mval)
+ break;
+
if (! ((*info->callbacks->multiple_definition)
(info, name, msec->owner, msec, mval, abfd, section,
value)))