bfd/
* elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check for
TLSLE_MOVW_TPREL_G2.
ld/testsuite/
* ld-aarch64/tprel_g2_overflow.s: New testcase.
* ld-aarch64/tprel_g2_overflow.d: New expectation file.
* ld-aarch64/aarch64-elf.exp: Run new testcase.
2015-01-13 Jiong Wang <jiong.wang@arm.com>
2015-01-13 Jiong Wang <jiong.wang@arm.com>
+ * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
+ for TLSLE_MOVW_TPREL_G2.
+
+2015-01-13 Jiong Wang <jiong.wang@arm.com>
+
PR ld/17415
* elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
PR ld/17415
* elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
12, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
12, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
+ complain_overflow_unsigned, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
AARCH64_R_STR (TLSLE_MOVW_TPREL_G2), /* name */
FALSE, /* partial_inplace */
bfd_elf_generic_reloc, /* special_function */
AARCH64_R_STR (TLSLE_MOVW_TPREL_G2), /* name */
FALSE, /* partial_inplace */
2015-01-13 Jiong Wang <jiong.wang@arm.com>
2015-01-13 Jiong Wang <jiong.wang@arm.com>
+ * ld-aarch64/tprel_g2_overflow.s: New testcase.
+ * ld-aarch64/tprel_g2_overflow.d: New expectation file.
+ * ld-aarch64/aarch64-elf.exp: Run new testcase.
+
+2015-01-13 Jiong Wang <jiong.wang@arm.com>
+
PR ld/17415
* ld-aarch64/pr17415.s: Source file for new test.
* ld-aarch64/pr17415.d: Expect file for new test.
PR ld/17415
* ld-aarch64/pr17415.s: Source file for new test.
* ld-aarch64/pr17415.d: Expect file for new test.
run_dump_test "gc-relocs-257-dyn"
run_dump_test "gc-relocs-257"
run_dump_test "pr17415"
run_dump_test "gc-relocs-257-dyn"
run_dump_test "gc-relocs-257"
run_dump_test "pr17415"
+run_dump_test "tprel_g2_overflow"
# ifunc tests
run_dump_test "ifunc-1"
# ifunc tests
run_dump_test "ifunc-1"
--- /dev/null
+#name: TLS offset out of range - TPREL_G2
+#source: tprel_g2_overflow.s
+#as:
+#ld: -e0
+#error: .*\(.text\+0x\d+\): relocation truncated to fit: R_AARCH64_TLSLE_MOVW_TPREL_G2 against symbol `i' .*
+
--- /dev/null
+ .cpu generic
+ .global ff
+ .section .tbss,"awT",%nobits
+ .align 3
+ .type ff, %object
+ .size ff, 562949953421312
+ff:
+ .zero 562949953421312
+ .global i
+ .align 2
+ .type i, %object
+ .size i, 4
+i:
+ .zero 4
+ .text
+ .align 2
+ .global main
+ .type main, %function
+main:
+ movz x0, #:tprel_g2:i
+ ret
+ .size main, .-main