+2016-11-24 Jiong Wang <jiong.wang@arm.com>
+
+ PR target/20737
+ * elf32-arm.c (elf32_arm_final_link_relocate): Bind defined symbol
+ locally in PIE.
+
2016-11-24 Kuan-Lin Chen <kuanlinchentw@gmail.com>
* bfd/elfxx-riscv.c (howto_table): Fix bitsize of R_RISCV_ADD8.
else if (h != NULL
&& h->dynindx != -1
&& (!bfd_link_pic (info)
- || !SYMBOLIC_BIND (info, h)
+ || !(bfd_link_pie (info)
+ || SYMBOLIC_BIND (info, h))
|| !h->def_regular))
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
+2016-11-24 Jiong Wang <jiong.wang@arm.com>
+
+ PR target/20737
+ * testsuite/ld-arm/pie-bind-locally-a.s: New test source.
+ * testsuite/ld-arm/pie-bind-locally-b.s: Likewise.
+ * testsuite/ld-arm/pie-bind-locally.d: New testcase.
+ * testsuite/ld-arm/arm-elf.exp: Run new testcase.
+
2016-11-24 Nick Clifton <nickc@redhat.com>
PR ld/20858
run_dump_test "movw-shared-4"
run_dump_test "rel32-reject"
run_dump_test "rel32-reject-pie"
+run_dump_test "pie-bind-locally"
# Exclude non-ARM-EABI targets.
--- /dev/null
+ .text
+ .align 2
+ .global _start
+_start:
+ .word _start(GOT)
--- /dev/null
+ .section .data.rel,"aw",%progbits
+ .align 2
+ .type q, %object
+ .size q, 4
+q:
+ .word _start
--- /dev/null
+#source: pie-bind-locally-a.s
+#source: pie-bind-locally-b.s
+#ld: -pie
+#readelf: -Wr
+
+Relocation section '\.rel\.dyn' at offset .* contains 2 entries:
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_ARM_RELATIVE[ ].*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_ARM_RELATIVE[ ].*