+2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12654
+ * elf32-i386.c (elf_i386_relocate_section): Check !executable
+ instead of shared for R_386_TLS_LDO_32.
+
2011-04-08 Tristan Gingold <gingold@adacore.com>
* Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
break;
case R_386_TLS_LDO_32:
- if (info->shared || (input_section->flags & SEC_CODE) == 0)
+ if (!info->executable || (input_section->flags & SEC_CODE) == 0)
relocation -= elf_i386_dtpoff_base (info);
else
/* When converting LDO to LE, we must negate. */
+2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12654
+ * ld-i386/i386.exp: Run tlspie2.
+
+ * ld-i386/tlspie2.d: New.
+ * ld-i386/tlspie2.s: Likewise.
+
2011-04-06 Joseph Myers <joseph@codesourcery.com>
* ld-selective/selective.exp (xscale-*-*): Don't handle.
run_dump_test "protected2"
run_dump_test "protected3"
run_dump_test "tlspie1"
+run_dump_test "tlspie2"
run_dump_test "nogot1"
run_dump_test "nogot2"
run_dump_test "discarded1"
--- /dev/null
+#name: TLS with PIE
+#as: --32
+#ld: -melf_i386 -pie
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+188 <_start>:
+[ ]*[a-f0-9]+: 8d 05 fc ff ff ff lea 0xfffffffc,%eax
+#pass
--- /dev/null
+ .section .tbss,"awT",@nobits
+ .align 4
+ .type a, @object
+ .size a, 4
+a:
+ .zero 4
+ .text
+.globl _start
+ .type _start, @function
+_start:
+ leal a@dtpoff, %eax
+ .size _start, .-_start