* elfxx-mips.c (mips_elf_calculate_relocation): Remove magic constant.
authorThiemo Seufer <ths@networkno.de>
Tue, 25 Jul 2006 09:01:02 +0000 (09:01 +0000)
committerThiemo Seufer <ths@networkno.de>
Tue, 25 Jul 2006 09:01:02 +0000 (09:01 +0000)
bfd/ChangeLog
bfd/elfxx-mips.c

index 8292b28ee105bb1087bc33882263e49d47f4ce27..86517d66782bfe7002b556b53f0b814d3433564d 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-25  Thiemo Seufer  <ths@mips.com>
+
+       * elfxx-mips.c (mips_elf_calculate_relocation): Remove magic constant.
+
 2006-07-24  Michael Wetherell  <mike.wetherell@ntlworld.com>
 
        * elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific
index 5e8bab485d1a9273200af8cd8f470082c7f45922..f917ba538f2914d8dc0ccb7d6293dc55884c5ee0 100644 (file)
@@ -4471,7 +4471,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
     case R_MIPS_GNU_REL16_S2:
       value = symbol + _bfd_mips_elf_sign_extend (addend, 18) - p;
       overflowed_p = mips_elf_overflow_p (value, 18);
-      value = (value >> 2) & howto->dst_mask;
+      value >>= howto->rightshift;
+      value &= howto->dst_mask;
       break;
 
     case R_MIPS_GOT_HI16: