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 | |
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')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1545df8..1f0e6d0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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-06 Alan Modra <amodra@bigpond.net.au> * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset 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; |