summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2004-12-14 09:48:10 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2004-12-14 09:48:10 +0000
commit0a88ad8f274042ca7da575818da46e5ee0d989db (patch)
tree2895c33a0c62afcf1e4834d26a0eedae8c51eb3d
parent7fcd73a35b08551ea689e8a090a847e9a9e7223f (diff)
downloadgdb-0a88ad8f274042ca7da575818da46e5ee0d989db.tar.gz
* elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
overflow for calls to undefined weak symbols.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f61fd226a29..e0d5f86e835 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-14 Richard Sandiford <rsandifo@redhat.com>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
+ overflow for calls to undefined weak symbols.
+
2004-12-11 Alan Modra <amodra@bigpond.net.au>
* elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index ef4650b1eb6..9ec9c86dcb0 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -3352,7 +3352,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
else
{
value = (_bfd_mips_elf_sign_extend (addend, 28) + symbol) >> 2;
- overflowed_p = (value >> 26) != ((p + 4) >> 28);
+ if (h->root.root.type != bfd_link_hash_undefweak)
+ overflowed_p = (value >> 26) != ((p + 4) >> 28);
}
value &= howto->dst_mask;
break;