aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-12-03 06:51:54 +0000
committerIan Lance Taylor <ian@airs.com>1999-12-03 06:51:54 +0000
commit2a6d49ea17a689a670a1ef29b0c2035c314c5ddb (patch)
treef5fef8946b27eff384e98a814b1e738cfea775d2 /bfd/elf32-mips.c
parente68692499c41be8d46ad655b1a566e2e0aea1d4b (diff)
downloadgdb-2a6d49ea17a689a670a1ef29b0c2035c314c5ddb.zip
gdb-2a6d49ea17a689a670a1ef29b0c2035c314c5ddb.tar.gz
gdb-2a6d49ea17a689a670a1ef29b0c2035c314c5ddb.tar.bz2
* elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
value by 4 before storing it back in the field. From Koundinya. K <kk@ddeorg.soft.net>.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index fe86862..6db9c23 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -6103,6 +6103,7 @@ mips_elf_calculate_relocation (abfd,
case R_MIPS_PC16:
value = mips_elf_sign_extend (addend, 16) + symbol - p;
+ value = (bfd_vma) ((bfd_signed_vma) value / 4);
overflowed_p = mips_elf_overflow_p (value, 16);
break;