+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
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);
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);
+2009-12-28 Daniel Gutson <dgutson@codesourcery.com>
+
+ * ld-arm/arm-elf.exp (armelftests): New test case added.
+ * ld-arm/reloc-boundaries.s: New file.
+ * ld-arm/reloc-boundaries.d: New file.
+
2009-12-28 Daniel Gutson <dgutson@codesourcery.com>
* ld-arm/arm-elf.exp: Run missing test
return
}
-# List contains test-items with 3 items followed by 2 lists:
+# List contains test-items with 3 items followed by 2 lists and one more item:
# 0:name 1:ld options 2:assembler options
# 3:filenames of assembler files 4: action and options. 5: name of output file
{"callweak-2" "-static -T arm.ld" "" {callweak-2.s}
{{objdump -dr callweak-2.d}}
"callweak-2"}
+ {"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" {reloc-boundaries.s}
+ {{objdump -s reloc-boundaries.d}}
+ "reloc-boundaries"}
}
run_ld_link_tests $armelftests
--- /dev/null
+
+[^:]*: file format elf32-(little|big)arm
+
+Contents of section .text:
+ 8000 80ff0080 ffff ......
+#...
--- /dev/null
+.syntax unified
+ .byte x -128
+ .byte x +255
+ .short y -32768
+ .short y +65535