diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6ccebdc..bce7915 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2009-12-28 Daniel Gutson <dgutson@codesourcery.com> + * elf32-arm.c (elf32_arm_final_link_relocate): limits + fixed. + +2009-12-28 Daniel Gutson <dgutson@codesourcery.com> + * elf-attrs.c (_bfd_elf_merge_object_attributes): Error message rephrased. diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 1921780..3e9759b 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -7212,7 +7212,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, case R_ARM_ABS8: value += addend; - if ((long) value > 0x7f || (long) value < -0x80) + + /* There is no way to tell whether the user intended to use a signed or + unsigned addend. When checking for overflow we accept either, + as specified by the AAELF. */ + if ((long) value > 0xff || (long) value < -0x80) return bfd_reloc_overflow; bfd_put_8 (input_bfd, value, hit_data); @@ -7221,7 +7225,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, case R_ARM_ABS16: value += addend; - if ((long) value > 0x7fff || (long) value < -0x8000) + /* See comment for R_ARM_ABS8. */ + if ((long) value > 0xffff || (long) value < -0x8000) return bfd_reloc_overflow; bfd_put_16 (input_bfd, value, hit_data); |