From 2a6d49ea17a689a670a1ef29b0c2035c314c5ddb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 3 Dec 1999 06:51:54 +0000 Subject: [PATCH] * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16 value by 4 before storing it back in the field. From Koundinya. K . --- bfd/ChangeLog | 6 ++++++ bfd/elf32-mips.c | 1 + 2 files changed, 7 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f7d3ffa9a17..7ec6946c149 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +1999-12-03 Ian Lance Taylor + + * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16 + value by 4 before storing it back in the field. From + Koundinya. K . + Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com) * archures.c (bfd_mach_am33): Define. diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index fe868626417..6db9c239e73 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; -- 2.30.2