]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix check for overflow of relocation for the Thumb BL instruction.
authorNick Clifton <nickc@redhat.com>
Mon, 6 May 2002 13:50:53 +0000 (13:50 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 6 May 2002 13:50:53 +0000 (13:50 +0000)
bfd/ChangeLog
bfd/elf32-arm.h

index b6e2fc3b6699fcd87c7702a799649a7957dac646..d137430e284b5023fe01b601abc251dfd68a591b 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * elf32-arm.h (elf32_arm_final_link_relocate): Convert
+       'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
+
 2002-05-02  Richard Henderson  <rth@redhat.com>
 
        * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
index d420e5bcf5ce1f489204468ea78cf0b28e366a98..9e8b09f931b130f9e3795a011360432e1888c39d 100644 (file)
@@ -1390,7 +1390,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
        boolean        overflow = false;
        bfd_vma        upper_insn = bfd_get_16 (input_bfd, hit_data);
        bfd_vma        lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
-       bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
+       bfd_signed_vma reloc_signed_max = ((1 << (howto->bitsize - 1)) - 1) >> howto->rightshift;
        bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
        bfd_vma        check;
        bfd_signed_vma signed_check;