aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2004-12-08 20:27:50 +0000
committerIan Lance Taylor <ian@airs.com>2004-12-08 20:27:50 +0000
commit728b2f2114e9b43d4b7bbb4bb56b022469a9df3f (patch)
treee4095a61bfe081813c280ba0f471d7f7d14dba9e /bfd/elfxx-mips.c
parent21fde4dc3d3c88a91468b1853a602e55f6f3ade5 (diff)
downloadgdb-728b2f2114e9b43d4b7bbb4bb56b022469a9df3f.zip
gdb-728b2f2114e9b43d4b7bbb4bb56b022469a9df3f.tar.gz
gdb-728b2f2114e9b43d4b7bbb4bb56b022469a9df3f.tar.bz2
* elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
overflow.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index fcbe6d3..ae553b4 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -3350,7 +3350,10 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
if (local_p)
value = ((addend | ((p + 4) & 0xf0000000)) + symbol) >> 2;
else
- value = (_bfd_mips_elf_sign_extend (addend, 28) + symbol) >> 2;
+ {
+ value = (_bfd_mips_elf_sign_extend (addend, 28) + symbol) >> 2;
+ overflowed_p = (value >> 26) != ((p + 4) >> 28);
+ }
value &= howto->dst_mask;
break;