aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1998-06-02 19:30:09 +0000
committerIan Lance Taylor <ian@airs.com>1998-06-02 19:30:09 +0000
commitd212bfa7230080ae4bea66f530a1c56dc99fc052 (patch)
treebc578c43c880ff29d49468306965d496671b4e84
parentc7b21300a752a45b91c62db010cc558426ca6c16 (diff)
downloadgdb-d212bfa7230080ae4bea66f530a1c56dc99fc052.zip
gdb-d212bfa7230080ae4bea66f530a1c56dc99fc052.tar.gz
gdb-d212bfa7230080ae4bea66f530a1c56dc99fc052.tar.bz2
* elf32-mips.c (mips_elf_relocate_section): If we issue an
undefined symbol error, don't also issue an overflow error.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-mips.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 30b719b..794b4c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 2 15:29:35 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf32-mips.c (mips_elf_relocate_section): If we issue an
+ undefined symbol error, don't also issue an overflow error.
+
Tue Jun 2 13:51:00 1998 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): The target of an
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index b503c4f..854fa27 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -4988,8 +4988,10 @@ mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_vma relocation;
boolean local;
+ boolean undefined_error;
/* This is a final link. */
+ undefined_error = false;
sym = NULL;
if (r_symndx < extsymoff
|| (elf_bad_symtab (input_bfd)
@@ -5084,6 +5086,7 @@ mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset)))
return false;
+ undefined_error = true;
relocation = 0;
}
}
@@ -5573,6 +5576,12 @@ mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& h->root.type == bfd_link_hash_undefweak)
r = bfd_reloc_ok;
+ /* If we've already issued an error for an undefined symbol,
+ don't issue another useless error. */
+ if (undefined_error
+ && (r == bfd_reloc_undefined || r == bfd_reloc_overflow))
+ r = bfd_reloc_ok;
+
if (SGI_COMPAT (abfd)
&& scpt != NULL
&& (input_section->flags & SEC_ALLOC) != 0)