+2014-01-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/16498
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Improve
+ orphaned TLS section handling.
+
2014-01-24 Alan Modra <amodra@gmail.com>
* ldlang.c (lang_output_section_find_by_flags): Be careful to
{ ".rodata",
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
0, 0, 0, 0 },
+ { ".tdata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_THREAD_LOCAL,
+ 0, 0, 0, 0 },
{ ".data",
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
0, 0, 0, 0 },
{
orphan_text = 0,
orphan_rodata,
+ orphan_tdata,
orphan_data,
orphan_bss,
orphan_rel,
place = &hold[orphan_bss];
else if ((s->flags & SEC_SMALL_DATA) != 0)
place = &hold[orphan_sdata];
+ else if ((s->flags & SEC_THREAD_LOCAL) != 0)
+ place = &hold[orphan_tdata];
else if ((s->flags & SEC_READONLY) == 0)
place = &hold[orphan_data];
else if (((iself && (sh_type == SHT_RELA || sh_type == SHT_REL))
+2014-01-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/16498
+ * ld-elf/pr16498a.d: New file.
+ * ld-elf/pr16498a.s: Likewise.
+ * ld-elf/pr16498a.t: Likewise.
+
2014-01-22 Alan Modra <amodra@gmail.com>
* ld-scripts/pr14962-2.d: Correct target triple.
--- /dev/null
+#ld: -shared -T pr16498a.t
+#readelf: -l --wide
+#target: *-*-linux* *-*-gnu* *-*-nacl*
+
+#...
+ TLS .*
+#...
+[ ]+[0-9]+[ ]+.tdata .tbss[ ]*
+#pass
--- /dev/null
+ .globl data
+ .data
+ .align 32
+ .type data, %object
+ .size data, 120
+data:
+ .long 1
+ .zero 116
+ .globl foo
+ .section .tbss,"awT",%nobits
+ .align 4
+ .type foo, %object
+ .size foo, 4
+foo:
+ .zero 4
+ .globl bar
+ .section .tdata,"awT",%progbits
+ .align 16
+ .type bar, %object
+ .size bar, 80
+bar:
+ .long 1
+ .zero 76
--- /dev/null
+SECTIONS
+{
+ .tdata : { *(.tdata) }
+ .data : { *(.data)
+ }
+}