diff options
author | Nick Clifton <nickc@redhat.com> | 2002-05-06 13:47:55 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-05-06 13:47:55 +0000 |
commit | df212a7e7fb2c54096f004f62e10e47538c543c7 (patch) | |
tree | c5ef3393befce0d26f41b3e3b7c7987e39a8f0ad /bfd/elf32-arm.h | |
parent | 3decf53c3240c6d72a46ca4035f60961f2ecafc9 (diff) | |
download | gdb-df212a7e7fb2c54096f004f62e10e47538c543c7.zip gdb-df212a7e7fb2c54096f004f62e10e47538c543c7.tar.gz gdb-df212a7e7fb2c54096f004f62e10e47538c543c7.tar.bz2 |
Fix check for overflow of relocation for the Thumb BL instruction.
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r-- | bfd/elf32-arm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 217666f..51c51a4 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -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; |