This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: ld-cris tests for TLS.


The 93 or so tests represent full static coverage of the changed
bfd/elf32-cris.c (though just checked manually) code plus some
trivial use-cases.  Committed.

No errors with make check when run under valgrind and without.
Patches simplifying that step will be posted later when time permits
(some cases are missing with plain e.g. make check-ld
'RUNTESTFLAGS=LD=valgrind\ -q\ /the/objdir/ld-new').

ld/testsuite:
	* ld-cris/got7.s, ld-cris/init.s, ld-cris/pic-gc-72.d,
	ld-cris/pic-gc-72.s, ld-cris/pic-gc-73.d, ld-cris/pic-gc-73.s,
	ld-cris/tls-dso-x1x2-1.d, ld-cris/tls-dso-xz-1.d,
	ld-cris/tls-dtprelm.s, ld-cris/tls-e-20.d, ld-cris/tls-e-20a.d,
	ld-cris/tls-e-21.d, ld-cris/tls-e-22.d, ld-cris/tls-e-23.d,
	ld-cris/tls-e-66.d, ld-cris/tls-err-20x.d, ld-cris/tls-err-24.d,
	ld-cris/tls-err-25.d, ld-cris/tls-err-26.d, ld-cris/tls-err-27.d,
	ld-cris/tls-err-28.d, ld-cris/tls-err-29.d, ld-cris/tls-err-31.d,
	ld-cris/tls-err-33.d, ld-cris/tls-err-35.d, ld-cris/tls-err-37.d,
	ld-cris/tls-err-39.d, ld-cris/tls-err-40.d, ld-cris/tls-err-41.d,
	ld-cris/tls-err-43.d, ld-cris/tls-err-44.d, ld-cris/tls-err-45.d,
	ld-cris/tls-err-47.d, ld-cris/tls-err-48.d, ld-cris/tls-err-49.d,
	ld-cris/tls-err-51.d, ld-cris/tls-err-52.d, ld-cris/tls-err-53.d,
	ld-cris/tls-err-55.d, ld-cris/tls-err-55.s, ld-cris/tls-err-56.d,
	ld-cris/tls-err-56.s, ld-cris/tls-err-62.d, ld-cris/tls-err-62.s,
	ld-cris/tls-err-65.d, ld-cris/tls-err-67.d, ld-cris/tls-gc-68.d,
	ld-cris/tls-gc-69.d, ld-cris/tls-gc-70.d, ld-cris/tls-gc-71.d,
	ld-cris/tls-gc-71.s, ld-cris/tls-gc-75.d, ld-cris/tls-gc-76.d,
	ld-cris/tls-gc-76.s, ld-cris/tls-gd-1.d, ld-cris/tls-gd-1.s,
	ld-cris/tls-gd-1h.d, ld-cris/tls-gd-2.d, ld-cris/tls-gd-2.s,
	ld-cris/tls-gd-2h.d, ld-cris/tls-gd-3.d, ld-cris/tls-gd-3.s,
	ld-cris/tls-gd-3h.d, ld-cris/tls-gdgotrelm.s, ld-cris/tls-global-74.d,
	ld-cris/tls-gottprelm.s, ld-cris/tls-hx.s, ld-cris/tls-hx1x2.s,
	ld-cris/tls-ie-10.d, ld-cris/tls-ie-10.s, ld-cris/tls-ie-11.d,
	ld-cris/tls-ie-11.s, ld-cris/tls-ie-8.d, ld-cris/tls-ie-8.s,
	ld-cris/tls-ie-9.d, ld-cris/tls-ie-9.s, ld-cris/tls-ld-4.d,
	ld-cris/tls-ld-4.s, ld-cris/tls-ld-5.d, ld-cris/tls-ld-5.s,
	ld-cris/tls-ld-6.d, ld-cris/tls-ld-6.s, ld-cris/tls-ld-7.d,
	ld-cris/tls-ld-7.s, ld-cris/tls-ldgd-14.d, ld-cris/tls-ldgd-14.s,
	ld-cris/tls-ldgd-15.d, ld-cris/tls-ldgd-15.s, ld-cris/tls-ldgde-14.d,
	ld-cris/tls-ldgde-15.d, ld-cris/tls-ldgdex-14.d,
	ld-cris/tls-ldgdex-15.d, ld-cris/tls-ldgdx-14.d,
	ld-cris/tls-ldgdx-15.d, ld-cris/tls-le-12.d, ld-cris/tls-le-12.s,
	ld-cris/tls-le-12s.d, ld-cris/tls-le-12s.s, ld-cris/tls-le-13.d,
	ld-cris/tls-le-13.s, ld-cris/tls-le-13s.d, ld-cris/tls-le-13s.s,
	ld-cris/tls-legd-16.d, ld-cris/tls-legd-16.s, ld-cris/tls-legd-17.d,
	ld-cris/tls-legdx-16.d, ld-cris/tls-legdx-17.d, ld-cris/tls-leie-18.d,
	ld-cris/tls-leie-19.d, ld-cris/tls-leie-19.s, ld-cris/tls-local-54.d,
	ld-cris/tls-local-54.s, ld-cris/tls-local-57.d,
	ld-cris/tls-local-57.s, ld-cris/tls-local-58.d,
	ld-cris/tls-local-58.s, ld-cris/tls-local-59.d,
	ld-cris/tls-local-59.s, ld-cris/tls-local-60.d,
	ld-cris/tls-local-61.d, ld-cris/tls-local-63.d,
	ld-cris/tls-local-64.d, ld-cris/tls-ok-30.d, ld-cris/tls-ok-32.d,
	ld-cris/tls-ok-34.d, ld-cris/tls-ok-36.d, ld-cris/tls-tprelm.s,
	ld-cris/tls-und-38.d, ld-cris/tls-und-42.d, ld-cris/tls-und-46.d,
	ld-cris/tls-und-50.d, ld-cris/tls-x.s, ld-cris/tls-x1x2.s,
	ld-cris/tls-z.s, ld-cris/tls128.s, ld-cris/tls128g.s: New tests.

Index: ld-cris/got7.s
===================================================================
RCS file: ld-cris/got7.s
diff -N ld-cris/got7.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/got7.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,21 @@
+; Just something defining 7 variables @ 4 bytes and requesting GOT
+;  entries for each of them.
+
+	.text
+	.global	got7fn
+	.type	got7fn,@function
+got7fn:
+	.irpc	n,1234567
+	move.d	got7var\n:GOT,$r10
+	.endr
+.Lfe:
+	.size	dsofn5,.Lfe-got7fn
+
+	.irpc	n,1234567
+	.data
+	.global got7var\n
+	.type	got7var\n,@object
+	.size	got7var\n,4
+got7var\n:
+	.dword 0
+	.endr
Index: ld-cris/init.s
===================================================================
RCS file: ld-cris/init.s
diff -N ld-cris/init.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/init.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+	.global _init
+	.type	_init,@function
+_init:
+	nop
+.Lfe3:
+	.size	_init,.Lfe3-_init
Index: ld-cris/pic-gc-72.d
===================================================================
RCS file: ld-cris/pic-gc-72.d
diff -N ld-cris/pic-gc-72.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/pic-gc-72.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,28 @@
+#source: pic-gc-72.s
+#source: expdref1.s
+#source: expdyn1.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux --gc-sections
+#objdump: -s -t -R -p -T
+
+# Exercise PIC relocs through changed GC sweep function.
+# There should be nothing left except from expdyn1.s.
+
+.*:     file format elf32-cris
+#...
+DYNAMIC RELOCATION RECORDS \(none\)
+
+Contents of section .hash:
+#...
+Contents of section .dynsym:
+#...
+Contents of section .dynstr:
+#...
+Contents of section .text:
+ 0188 0f050f05                             .*
+Contents of section .dynamic:
+#...
+Contents of section .got:
+ 21e4 8c210000 00000000 00000000           .*
+Contents of section .data:
+ 21f0 00000000                             .*
Index: ld-cris/pic-gc-72.s
===================================================================
RCS file: ld-cris/pic-gc-72.s
diff -N ld-cris/pic-gc-72.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/pic-gc-72.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,3 @@
+ .hidden export_1
+ .include "dso-2.s"
+ move.w expobj:GOT16,$r10
Index: ld-cris/pic-gc-73.d
===================================================================
RCS file: ld-cris/pic-gc-73.d
diff -N ld-cris/pic-gc-73.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/pic-gc-73.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,26 @@
+#source: pic-gc-73.s
+#source: expdyn1.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux --gc-sections
+#objdump: -s -t -R -p -T
+
+# Left-over code coverage case from pic-gc-72; local symbol.
+
+.*:     file format elf32-cris
+#...
+DYNAMIC RELOCATION RECORDS \(none\)
+
+Contents of section .hash:
+#...
+Contents of section .dynsym:
+#...
+Contents of section .dynstr:
+#...
+Contents of section .text:
+ 016e 0f050f05                             .*
+Contents of section .dynamic:
+#...
+Contents of section .got:
+ 21cc 74210000 00000000 00000000           .*
+Contents of section .data:
+ 21d8 00000000                             .*
Index: ld-cris/pic-gc-73.s
===================================================================
RCS file: ld-cris/pic-gc-73.s
diff -N ld-cris/pic-gc-73.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/pic-gc-73.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,5 @@
+ .hidden export_1
+ .include "dso-2.s"
+dsofn:
+ .type	dsofn,@function
+ move.w expobj:GOT16,$r10
Index: ld-cris/tls-dso-x1x2-1.d
===================================================================
RCS file: ld-cris/tls-dso-x1x2-1.d
diff -N ld-cris/tls-dso-x1x2-1.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-dso-x1x2-1.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,16 @@
+#source: tls-hx.s
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#objdump: -T
+
+# A DSO providing the TLS variables x1 and x2.
+
+.*:     file format elf32-cris
+
+DYNAMIC SYMBOL TABLE:
+#...
+0+8 g    D  \.tdata	0+4 x2
+#...
+0+4 g    D  \.tdata	0+4 x1
+#...
Index: ld-cris/tls-dso-xz-1.d
===================================================================
RCS file: ld-cris/tls-dso-xz-1.d
diff -N ld-cris/tls-dso-xz-1.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-dso-xz-1.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,18 @@
+#source: tls128.s
+#source: tls-hx1x2.s
+#source: tls-x.s
+#source: tls-z.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#objdump: -T
+
+# A DSO providing the TLS variables x and z.
+
+.*:     file format elf32-cris
+
+DYNAMIC SYMBOL TABLE:
+#...
+0+88 g    D  \.tdata	0+4 x
+#...
+0+8c g    D  \.tdata	0+4 z
+#...
Index: ld-cris/tls-dtprelm.s
===================================================================
RCS file: ld-cris/tls-dtprelm.s
diff -N ld-cris/tls-dtprelm.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-dtprelm.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,26 @@
+	.text
+
+	.ifndef r
+	.set r,1
+	.endif
+
+	.global	tlsdsofndtprelm
+	.type	tlsdsofndtprelm,@function
+	.p2align 1
+tlsdsofndtprelm:
+	move.w x:DTPREL16,$r10
+.Lfe:
+	.size	tlsdsofndtprelm,.Lfe-tlsdsofndtprelm
+
+	.globl z
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	z,@object
+	.size	z,r
+z:
+	.fill	r,1,42
+
+	.type	x,@object
+	.size	x,1
+x:
+	.byte 42
Index: ld-cris/tls-e-20.d
===================================================================
RCS file: ld-cris/tls-e-20.d
diff -N ld-cris/tls-e-20.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-e-20.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,71 @@
+#source: start1.s
+#source: tls-gd-2.s --pic
+#source: tls-hx.s
+#source: tls-ld-6.s --pic
+#source: tls-ie-10.s --pic
+#source: tls-hx1x2.s --pic
+#as: --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a R_CRIS_32_GOT_GD, a R_CRIS_DTPREL and a
+# R_CRIS_32_GOT_TPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+b0 memsz 0x0+b0 flags r-x
+    LOAD off    0x0+b0 vaddr 0x0+820b0 paddr 0x0+820b0 align 2\*\*13
+         filesz 0x0+2c memsz 0x0+2c flags rw-
+     TLS off    0x0+b0 vaddr 0x0+820b0 paddr 0x0+820b0 align 2\*\*2
+         filesz 0x0+c memsz 0x0+c flags r--
+private flags = 0:
+
+Sections:
+Idx Name          Size      VMA       LMA       File off  Algn
+  0 \.text         0000001c  00080094  00080094  00000094  2\*\*1
+                  CONTENTS, ALLOC, LOAD, READONLY, CODE
+  1 \.tdata        0000000c  000820b0  000820b0  000000b0  2\*\*2
+                  CONTENTS, ALLOC, LOAD, DATA, THREAD_LOCAL
+  2 \.got          00000020  000820bc  000820bc  000000bc  2\*\*2
+                  CONTENTS, ALLOC, LOAD, DATA
+SYMBOL TABLE:
+0+80094 l    d  \.text	0+ \.text
+0+820b0 l    d  \.tdata	0+ \.tdata
+0+820bc l    d  \.got	0+ \.got
+0+820bc l     O \.got	0+ \.hidden _GLOBAL_OFFSET_TABLE_
+0+ g       \.tdata	0+4 \.hidden x
+0+80098 g     F \.text	0+6 tlsdsofn2
+0+8 g       \.tdata	0+4 \.hidden x2
+0+80094 g       \.text	0+ _start
+0+820dc g       \*ABS\*	0+ __bss_start
+0+800a0 g     F \.text	0+6 tlsdsofn
+0+4 g       \.tdata	0+4 \.hidden x1
+0+820dc g       \*ABS\*	0+ _edata
+0+820e0 g       \*ABS\*	0+ _end
+0+800a8 g     F \.text	0+6 tlsdsofn10
+
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+ 820b0 28000000 29000000 2a000000           .*
+Contents of section \.got:
+ 820bc 00000000 00000000 00000000 01000000  .*
+ 820cc 00000000 00000000 01000000 00000000  .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsdsofn2>:
+   80098:	6fae 1800 0000      	move\.d 18 <x2\+0x10>,\$r10
+#...
+000800a0 <tlsdsofn>:
+   800a0:	6fae 0000 0000      	move\.d 0 <x>,\$r10
+#...
+000800a8 <tlsdsofn10>:
+   800a8:	6fae 1400 0000      	move\.d 14 <x2\+0xc>,\$r10
+#...
Index: ld-cris/tls-e-20a.d
===================================================================
RCS file: ld-cris/tls-e-20a.d
diff -N ld-cris/tls-e-20a.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-e-20a.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,110 @@
+#source: start1.s
+#source: got7.s
+#source: tls128.s
+#source: tls-gd-2.s
+#source: tls-ld-6.s
+#source: tls-ie-10.s
+#source: tls-hx.s
+#source: tls-hx1x2.s
+#as: --no-underscore --em=criself -I$srcdir/$subdir --pic
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Like tls-e-20.d but with an offset for all TLS GOT entries, and an
+# offset for all TLS data we care about.  Offsets different for TLS
+# than for GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+dc memsz 0x0+dc flags r-x
+    LOAD off    0x0+dc vaddr 0x0+820dc paddr 0x0+820dc align 2\*\*13
+         filesz 0x0+e4 memsz 0x0+e4 flags rw-
+     TLS off    0x0+dc vaddr 0x0+820dc paddr 0x0+820dc align 2\*\*2
+         filesz 0x0+8c memsz 0x0+8c flags r--
+private flags = 0:
+
+Sections:
+Idx Name          Size      VMA       LMA       File off  Algn
+  0 \.text         0+48  0+80094  0+80094  0+94  2\*\*1
+                  CONTENTS, ALLOC, LOAD, READONLY, CODE
+  1 \.tdata        0+8c  0+820dc  0+820dc  0+dc  2\*\*2
+                  CONTENTS, ALLOC, LOAD, DATA, THREAD_LOCAL
+  2 \.got          0+3c  0+82168  0+82168  0+168  2\*\*2
+                  CONTENTS, ALLOC, LOAD, DATA
+  3 \.data         0+1c  0+821a4  0+821a4  0+1a4  2\*\*0
+                  CONTENTS, ALLOC, LOAD, DATA
+SYMBOL TABLE:
+0+80094 l    d  \.text	0+ \.text
+0+820dc l    d  \.tdata	0+ \.tdata
+0+82168 l    d  \.got	0+ \.got
+0+821a4 l    d  \.data	0+ \.data
+0+ l       \.tdata	0+80 tls128
+0+82168 l     O \.got	0+ \.hidden _GLOBAL_OFFSET_TABLE_
+0+80 g       \.tdata	0+4 \.hidden x
+0+800c4 g     F \.text	0+6 tlsdsofn2
+0+821b4 g     O \.data	0+4 got7var5
+0+88 g       \.tdata	0+4 \.hidden x2
+0+821ac g     O \.data	0+4 got7var3
+0+821bc g     O \.data	0+4 got7var7
+0+80098 g     F \.text	0+ got7fn
+0+821b8 g     O \.data	0+4 got7var6
+0+80094 g       \.text	0+ _start
+0+821c0 g       \*ABS\*	0+ __bss_start
+0+821a4 g     O \.data	0+4 got7var1
+0+821b0 g     O \.data	0+4 got7var4
+0+800cc g     F \.text	0+6 tlsdsofn
+0+84 g       \.tdata	0+4 \.hidden x1
+0+821c0 g       \*ABS\*	0+ _edata
+0+821c0 g       \*ABS\*	0+ _end
+0+821a8 g     O \.data	0+4 got7var2
+0+800d4 g     F \.text	0+6 tlsdsofn10
+
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+ 820dc 2f000000 00000000 00000000 00000000  .*
+ 820ec 00000000 00000000 00000000 00000000  .*
+ 820fc 00000000 00000000 00000000 00000000  .*
+ 8210c 00000000 00000000 00000000 00000000  .*
+ 8211c 00000000 00000000 00000000 00000000  .*
+ 8212c 00000000 00000000 00000000 00000000  .*
+ 8213c 00000000 00000000 00000000 00000000  .*
+ 8214c 00000000 00000000 00000000 00000000  .*
+ 8215c 28000000 29000000 2a000000           .*
+Contents of section \.got:
+ 82168 00000000 00000000 00000000 01000000  .*
+ 82178 00000000 80000000 01000000 80000000  .*
+ 82188 b4210800 ac210800 bc210800 b8210800  .*
+ 82198 a4210800 b0210800 a8210800           .*
+Contents of section \.data:
+ 821a4 00000000 00000000 00000000 00000000  .*
+ 821b4 00000000 00000000 00000000           .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <got7fn>:
+   80098:	6fae 3000 0000      	move\.d 30 <tls128\+0x30>,\$r10
+   8009e:	6fae 3800 0000      	move\.d 38 <tls128\+0x38>,\$r10
+   800a4:	6fae 2400 0000      	move\.d 24 <tls128\+0x24>,\$r10
+   800aa:	6fae 3400 0000      	move\.d 34 <tls128\+0x34>,\$r10
+   800b0:	6fae 2000 0000      	move\.d 20 <tls128\+0x20>,\$r10
+   800b6:	6fae 2c00 0000      	move\.d 2c <tls128\+0x2c>,\$r10
+   800bc:	6fae 2800 0000      	move\.d 28 <tls128\+0x28>,\$r10
+#...
+
+000800c4 <tlsdsofn2>:
+   800c4:	6fae 1800 0000      	move\.d 18 <tls128\+0x18>,\$r10
+#...
+
+000800cc <tlsdsofn>:
+   800cc:	6fae 8000 0000      	move\.d 80 <x>,\$r10
+#...
+
+000800d4 <tlsdsofn10>:
+   800d4:	6fae 1400 0000      	move\.d 14 <tls128\+0x14>,\$r10
+#...
Index: ld-cris/tls-e-21.d
===================================================================
RCS file: ld-cris/tls-e-21.d
diff -N ld-cris/tls-e-21.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-e-21.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,39 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-gd-2.s
+#source: tls-hx.s
+#as: --no-underscore --em=criself --pic
+#ld: -m crislinux
+#objdump: -d -s -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a single R_CRIS_32_GOT_GD.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 \.hidden x
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82124 00000000 00000000 00000000 01000000  .*
+ 82134 80000000                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsdsofn2>:
+   80098:	6fae 0c00 0000      	move\.d c <tls128\+0xc>,\$r10
+#...
Index: ld-cris/tls-e-22.d
===================================================================
RCS file: ld-cris/tls-e-22.d
diff -N ld-cris/tls-e-22.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-e-22.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,39 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ld-6.s
+#source: tls-hx.s
+#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a single R_CRIS_DTPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 \.hidden x
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82124 00000000 00000000 00000000 01000000  .*
+ 82134 00000000                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsdsofn>:
+   80098:	6fae 8000 0000      	move\.d 80 <x>,\$r10
+#...
Index: ld-cris/tls-e-23.d
===================================================================
RCS file: ld-cris/tls-e-23.d
diff -N ld-cris/tls-e-23.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-e-23.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,38 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ie-10.s
+#source: tls-hx.s
+#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a single R_CRIS_32_GOT_TPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 \.hidden x
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82124 00000000 00000000 00000000 80000000  .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsdsofn10>:
+   80098:	6fae 0c00 0000      	move\.d c <tls128\+0xc>,\$r10
+#...
Index: ld-cris/tls-e-66.d
===================================================================
RCS file: ld-cris/tls-e-66.d
diff -N ld-cris/tls-e-66.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-e-66.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,37 @@
+#source: start1.s
+#source: tls-le-12s.s
+#source: tls-z.s
+#as: --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p -h
+
+# Check that we have proper NPTL/TLS markings and no GOT for an
+# executable with a single R_CRIS_16_TPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+9c vaddr 0x0+8209c paddr 0x0+8209c align 2\*\*2
+         filesz 0x0+4 memsz 0x0+4 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+ g       \.tdata	0+4 z
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn12>:
+   80098:	5fac 0000           	movu\.w 0x0,\$r10
+#...
Index: ld-cris/tls-err-20x.d
===================================================================
RCS file: ld-cris/tls-err-20x.d
diff -N ld-cris/tls-err-20x.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-20x.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,11 @@
+#source: init.s
+#source: tls-ie-9.s --pic
+#source: tls-ld-6.s --pic
+#source: tls-ie-10.s --pic
+#source: tls-hx.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*: warning: cannot find entry symbol _start; defaulting to [0-9a-f]*\n[^\n]*: In function `tlsdsofn9':\n[^\n]*: undefined reference to `x1'\n[^\n]*: In function `tlsdsofn9':\n[^n]*: undefined reference to `x2'\Z
+
+# Code coverage case similar to tls-e-20.d, except with an undefined
+# reference.
Index: ld-cris/tls-err-24.d
===================================================================
RCS file: ld-cris/tls-err-24.d
diff -N ld-cris/tls-err-24.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-24.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: tls-le-12s.s
+#source: tls-z.s
+#as: --no-underscore --em=criself
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
+
+# Check that R_CRIS_16_TPREL in input to a DSO is flagged as an error.
Index: ld-cris/tls-err-25.d
===================================================================
RCS file: ld-cris/tls-err-25.d
diff -N ld-cris/tls-err-25.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-25.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: tls-le-12.s
+#source: tls-z.s
+#as: --no-underscore --em=criself
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
+
+# Check that R_CRIS_32_TPREL in input to a DSO is flagged as an error.
Index: ld-cris/tls-err-26.d
===================================================================
RCS file: ld-cris/tls-err-26.d
diff -N ld-cris/tls-err-26.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-26.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+#source: tls-ld-4.s
+#source: tls-x.s
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
+
+# Check that R_CRIS_16_DTPREL on non-module-local symbol in input to a
+# DSO is flagged as an error.
Index: ld-cris/tls-err-27.d
===================================================================
RCS file: ld-cris/tls-err-27.d
diff -N ld-cris/tls-err-27.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-27.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+#source: tls-ld-6.s
+#source: tls-x.s
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
+
+# Check that R_CRIS_32_DTPREL on non-module-local symbol in input to a
+# DSO is flagged as an error.
Index: ld-cris/tls-err-28.d
===================================================================
RCS file: ld-cris/tls-err-28.d
diff -N ld-cris/tls-err-28.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-28.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: tls-gd-3.s
+#source: tls-x.s
+#as: --no-underscore --em=criself
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
+
+# Check that a R_CRIS_32_GD in input to a DSO is flagged as an error.
Index: ld-cris/tls-err-29.d
===================================================================
RCS file: ld-cris/tls-err-29.d
diff -N ld-cris/tls-err-29.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-29.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: init.s
+#source: tls-gdgotrelm.s --defsym r=8192
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\Z
+
+# Check that overflow for R_CRIS_16_GOT_GD is flagged as an error.
Index: ld-cris/tls-err-31.d
===================================================================
RCS file: ld-cris/tls-err-31.d
diff -N ld-cris/tls-err-31.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-31.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+#source: tls-dtprelm.s --defsym r=32768
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too big[^\n]*\Z
+
+# Check that overflow for R_CRIS_16_DTPREL is flagged as an error.
Index: ld-cris/tls-err-33.d
===================================================================
RCS file: ld-cris/tls-err-33.d
diff -N ld-cris/tls-err-33.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-33.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+#source: tls-gottprelm.s --defsym r=8190
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\Z
+
+# Check that overflow for R_CRIS_16_GOT_TPREL is flagged as an error.
Index: ld-cris/tls-err-35.d
===================================================================
RCS file: ld-cris/tls-err-35.d
diff -N ld-cris/tls-err-35.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-35.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-tprelm.s --defsym r=32768
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too big[^\n]*\Z
+
+# Check that overflow for R_CRIS_16_TPREL is flagged as an error.
Index: ld-cris/tls-err-37.d
===================================================================
RCS file: ld-cris/tls-err-37.d
diff -N ld-cris/tls-err-37.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-37.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-gd-2.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_32_GOT_GD in an executable.
Index: ld-cris/tls-err-39.d
===================================================================
RCS file: ld-cris/tls-err-39.d
diff -N ld-cris/tls-err-39.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-39.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-ld-6.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_32_DTPREL in an executable.
Index: ld-cris/tls-err-40.d
===================================================================
RCS file: ld-cris/tls-err-40.d
diff -N ld-cris/tls-err-40.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-40.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+#source: tls-ld-6.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*Bad value\Z
+
+# Undefined reference for a R_CRIS_32_DTPREL in a DSO.
Index: ld-cris/tls-err-41.d
===================================================================
RCS file: ld-cris/tls-err-41.d
diff -N ld-cris/tls-err-41.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-41.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-ie-10.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_32_GOT_TPREL in an executable.
Index: ld-cris/tls-err-43.d
===================================================================
RCS file: ld-cris/tls-err-43.d
diff -N ld-cris/tls-err-43.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-43.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-le-12.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_32_TPREL in an executable.
Index: ld-cris/tls-err-44.d
===================================================================
RCS file: ld-cris/tls-err-44.d
diff -N ld-cris/tls-err-44.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-44.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+#source: tls-le-12.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
+
+# Undefined reference for a R_CRIS_32_TPREL in a DSO (where it's
+# invalid in the first place anyway, so we should see the same
+# behavior as for that test, tls-err-25.d).
Index: ld-cris/tls-err-45.d
===================================================================
RCS file: ld-cris/tls-err-45.d
diff -N ld-cris/tls-err-45.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-45.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-gd-1.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_16_GOT_GD in an executable.
Index: ld-cris/tls-err-47.d
===================================================================
RCS file: ld-cris/tls-err-47.d
diff -N ld-cris/tls-err-47.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-47.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-ld-4.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_16_DTPREL in an executable.
Index: ld-cris/tls-err-48.d
===================================================================
RCS file: ld-cris/tls-err-48.d
diff -N ld-cris/tls-err-48.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-48.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+#source: tls-ld-4.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*Bad value\Z
+
+# Undefined reference for a R_CRIS_16_DTPREL in a DSO.
Index: ld-cris/tls-err-49.d
===================================================================
RCS file: ld-cris/tls-err-49.d
diff -N ld-cris/tls-err-49.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-49.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-ie-8.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_16_GOT_TPREL in an executable.
Index: ld-cris/tls-err-51.d
===================================================================
RCS file: ld-cris/tls-err-51.d
diff -N ld-cris/tls-err-51.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-51.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-le-12s.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#error: \A[^\n]*\.o: In function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
+
+# Undefined reference for a R_CRIS_16_TPREL in an executable.
Index: ld-cris/tls-err-52.d
===================================================================
RCS file: ld-cris/tls-err-52.d
diff -N ld-cris/tls-err-52.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-52.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+#source: tls-le-12s.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
+
+# Undefined reference for a R_CRIS_16_TPREL in a DSO (where it's
+# invalid in the first place anyway, so we should see the same
+# behavior as for that test, tls-err-24.d).
Index: ld-cris/tls-err-53.d
===================================================================
RCS file: ld-cris/tls-err-53.d
diff -N ld-cris/tls-err-53.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-53.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-ld-4.s
+#as: --no-underscore --em=criself --pic
+#ld: -m crislinux tmpdir/tls-dso-xz-1.so
+#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
+
+# R_CRIS_16_DTPREL in executable against symbol from DSO.
Index: ld-cris/tls-err-55.d
===================================================================
RCS file: ld-cris/tls-err-55.d
diff -N ld-cris/tls-err-55.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-55.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+#source: tls-err-55.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*Bad value\Z
+
+# Check that non-zero addend on a R_CRIS_32_GOT_GD is flagged as an error.
Index: ld-cris/tls-err-55.s
===================================================================
RCS file: ld-cris/tls-err-55.s
diff -N ld-cris/tls-err-55.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-55.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn2
+	.type	tlsdsofn2,@function
+	.p2align 1
+tlsdsofn2:
+	move.d tls128+42:GDGOTREL,$r10
+.Lfe1:
+	.size	tlsdsofn2,.Lfe1-tlsdsofn2
Index: ld-cris/tls-err-56.d
===================================================================
RCS file: ld-cris/tls-err-56.d
diff -N ld-cris/tls-err-56.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-56.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: tls-err-56.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*Bad value\Z
+
+# Check that non-zero addend on a R_CRIS_32_GOT_GD is flagged as an error.
+# The difference to tls-err-55.d is that this one refers to a local symbol.
Index: ld-cris/tls-err-56.s
===================================================================
RCS file: ld-cris/tls-err-56.s
diff -N ld-cris/tls-err-56.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-56.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.include "tls128.s"
+	.text
+	.global	tlsdsofn2
+	.type	tlsdsofn2,@function
+	.p2align 1
+tlsdsofn2:
+	move.d tls128+42:GDGOTREL,$r10
+.Lfe1:
+	.size	tlsdsofn2,.Lfe1-tlsdsofn2
Index: ld-cris/tls-err-62.d
===================================================================
RCS file: ld-cris/tls-err-62.d
diff -N ld-cris/tls-err-62.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-62.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: tls-err-62.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_TPREL with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*Bad value\Z
+
+# Check that non-zero addend on a R_CRIS_32_GOT_TPREL is flagged as an
+# error, local symbol.
Index: ld-cris/tls-err-62.s
===================================================================
RCS file: ld-cris/tls-err-62.s
diff -N ld-cris/tls-err-62.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-62.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.include "tls128.s"
+	.text
+	.global	tlsdsofn2
+	.type	tlsdsofn2,@function
+	.p2align 1
+tlsdsofn2:
+	move.d tls128+42:TPOFFGOT,$r10
+.Lfe1:
+	.size	tlsdsofn2,.Lfe1-tlsdsofn2
Index: ld-cris/tls-err-65.d
===================================================================
RCS file: ld-cris/tls-err-65.d
diff -N ld-cris/tls-err-65.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-65.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+#source: start1.s
+#source: tls-le-12s.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux tmpdir/tls-dso-xz-1.so
+#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
+
+# R_CRIS_16_TPREL in executable against symbol from DSO.
Index: ld-cris/tls-err-67.d
===================================================================
RCS file: ld-cris/tls-err-67.d
diff -N ld-cris/tls-err-67.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-err-67.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+#source: init.s
+#source: tls-gdgotrelm.s --defsym r=8203
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#error: \A[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: In[^\n]*\n[^\n]*omitted[^\n]*\Z
+
+# Check that the error messages get the right number of appended
+# explanations with default values when bailing out and omitting
+# further error messages for overflows.
Index: ld-cris/tls-gc-68.d
===================================================================
RCS file: ld-cris/tls-gc-68.d
diff -N ld-cris/tls-gc-68.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-68.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,33 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-local-58.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux --gc-sections
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD and a R_CRIS_16_GOT_GD against
+# the same local symbol, gc:ed.  Check that we have nothing left but
+# the start symbol and its code.  Can't get rid of the GOT just yet.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+78 memsz 0x0+78 flags r-x
+    LOAD off    0x0+78 vaddr 0x0+82078 paddr 0x0+82078 align 2\*\*13
+         filesz 0x0+c memsz 0x0+c flags rw-
+private flags = 0:
+
+SYMBOL TABLE:
+0+80074 l    d  .text	0+ .text
+0+82078 l    d  .got	0+ .got
+0+82078 l     O .got	0+ .hidden _GLOBAL_OFFSET_TABLE_
+0+80074 g       .text	0+ _start
+0+82084 g       \*ABS\*	0+ __bss_start
+0+82084 g       \*ABS\*	0+ _edata
+0+820a0 g       \*ABS\*	0+ _end
+
+Contents of section .text:
+ 80074 41b20+                             .*
+Contents of section .got:
+ 82078 0+ 0+ 0+           .*
Index: ld-cris/tls-gc-69.d
===================================================================
RCS file: ld-cris/tls-gc-69.d
diff -N ld-cris/tls-gc-69.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-69.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,34 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-local-59.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux --gc-sections
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD, a R_CRIS_16_GOT_GD, a
+# R_CRIS_32_GOT_TPREL and a R_CRIS_16_GOT_TPREL against the same local
+# symbol, gc:ed.  Check that we have nothing left but the start symbol
+# and its code.  Can't get rid of the GOT just yet.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+78 memsz 0x0+78 flags r-x
+    LOAD off    0x0+78 vaddr 0x0+82078 paddr 0x0+82078 align 2\*\*13
+         filesz 0x0+c memsz 0x0+c flags rw-
+private flags = 0:
+
+SYMBOL TABLE:
+0+80074 l    d  .text	0+ .text
+0+82078 l    d  .got	0+ .got
+0+82078 l     O .got	0+ .hidden _GLOBAL_OFFSET_TABLE_
+0+80074 g       .text	0+ _start
+0+82084 g       \*ABS\*	0+ __bss_start
+0+82084 g       \*ABS\*	0+ _edata
+0+820a0 g       \*ABS\*	0+ _end
+
+Contents of section .text:
+ 80074 41b20+                             .*
+Contents of section .got:
+ 82078 0+ 0+ 0+           .*
Index: ld-cris/tls-gc-70.d
===================================================================
RCS file: ld-cris/tls-gc-70.d
diff -N ld-cris/tls-gc-70.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-70.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,34 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-gd-3.s
+#source: tls-x.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --gc-sections
+#objdump: -s -t -r -p
+
+# An executable with a single R_CRIS_32_GD, with gc.  Check that we
+# have nothing left but the start symbol and its code.  Can't get rid
+# of the GOT just yet.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+78 memsz 0x0+78 flags r-x
+    LOAD off    0x0+78 vaddr 0x0+82078 paddr 0x0+82078 align 2\*\*13
+         filesz 0x0+c memsz 0x0+c flags rw-
+private flags = 0:
+
+SYMBOL TABLE:
+0+80074 l    d  .text	0+ .text
+0+82078 l    d  .got	0+ .got
+0+82078 l     O .got	0+ .hidden _GLOBAL_OFFSET_TABLE_
+0+80074 g       .text	0+ _start
+0+82084 g       \*ABS\*	0+ __bss_start
+0+82084 g       \*ABS\*	0+ _edata
+0+820a0 g       \*ABS\*	0+ _end
+
+Contents of section .text:
+ 80074 41b20+                             .*
+Contents of section .got:
+ 82078 0+ 0+ 0+           .*
Index: ld-cris/tls-gc-71.d
===================================================================
RCS file: ld-cris/tls-gc-71.d
diff -N ld-cris/tls-gc-71.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-71.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,32 @@
+#source: tls-gc-71.s
+#source: init.s
+#source: tls128g.s
+#source: tls-hx.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux --gc-sections
+#objdump: -s -t -R -p -T
+
+# DSO with a single R_CRIS_16_DTPREL against a hidden symbol, gc:ed.
+# Check that we still have the other, global, TLS variable.
+
+.*:     file format elf32-cris
+#...
+     TLS off .*
+         filesz 0x0+80 memsz 0x0+80 flags r--
+#...
+DYNAMIC SYMBOL TABLE:
+0+18e l    d  .text	0+ .text
+0+2194 l    d  .tdata	0+ .tdata
+0+18e g    DF .text	0+2 _init
+0+2280 g    D  \*ABS\*	0+ __bss_start
+0+ g    D  .tdata	0+80 tls128
+0+2280 g    D  \*ABS\*	0+ _edata
+0+2280 g    D  \*ABS\*	0+ _end
+
+DYNAMIC RELOCATION RECORDS \(none\)
+#...
+Contents of section .text:
+ 018e 0f050000                             .*
+#...
+Contents of section .got:
+ 2274 14220000 00000000 00000000           .*
Index: ld-cris/tls-gc-71.s
===================================================================
RCS file: ld-cris/tls-gc-71.s
diff -N ld-cris/tls-gc-71.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-71.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,2 @@
+ .hidden tlsdsofn
+ .include "tls-ld-4.s"
Index: ld-cris/tls-gc-75.d
===================================================================
RCS file: ld-cris/tls-gc-75.d
diff -N ld-cris/tls-gc-75.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-75.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,36 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-gd-2.s
+#source: tls-ie-10.s
+#source: tls-gd-1.s
+#source: tls-ie-8.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux --gc-sections
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD, a R_CRIS_16_GOT_GD, a
+# R_CRIS_32_GOT_TPREL and a R_CRIS_16_GOT_TPREL against the same
+# symbol, gc:ed.  Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+78 memsz 0x0+78 flags r-x
+    LOAD off    0x0+78 vaddr 0x0+82078 paddr 0x0+82078 align 2\*\*13
+         filesz 0x0+c memsz 0x0+c flags rw-
+private flags = 0:
+
+SYMBOL TABLE:
+0+80074 l    d  .text	0+ .text
+0+82078 l    d  .got	0+ .got
+0+82078 l     O .got	0+ .hidden _GLOBAL_OFFSET_TABLE_
+0+80074 g       .text	0+ _start
+0+82084 g       \*ABS\*	0+ __bss_start
+0+82084 g       \*ABS\*	0+ _edata
+0+820a0 g       \*ABS\*	0+ _end
+
+Contents of section .text:
+ 80074 41b20+                             .*
+Contents of section .got:
+ 82078 0+ 0+ 0+           .*
Index: ld-cris/tls-gc-76.d
===================================================================
RCS file: ld-cris/tls-gc-76.d
diff -N ld-cris/tls-gc-76.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-76.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,38 @@
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux --gc-sections -u gc76fn
+#source: start1.s
+#source: tls-gc-76.s
+#source: tls-hx.s
+#objdump: -s -t -r -p
+
+# Executable with a single R_CRIS_32_DTPREL, gc:ed away.
+# A GOT reference through a local symbol to a variable survives gc.
+
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
+         filesz 0x0+80 memsz 0x0+80 flags r-x
+    LOAD off    0x0+80 vaddr 0x0+82080 paddr 0x0+82080 align 2\*\*13
+         filesz 0x0+14 memsz 0x0+14 flags rw-
+private flags = 0:
+
+SYMBOL TABLE:
+0+80074 l    d  .text	0+ .text
+0+82080 l    d  .got	0+ .got
+0+82090 l    d  .data	0+ .data
+0+82090 l     O .data	0+4 gc76var
+0+82080 l     O .got	0+ .hidden _GLOBAL_OFFSET_TABLE_
+0+80074 g       .text	0+ _start
+0+82094 g       \*ABS\*	0+ __bss_start
+0+82094 g       \*ABS\*	0+ _edata
+0+820a0 g       \*ABS\*	0+ _end
+0+80078 g     F .text	0+6 gc76fn
+
+Contents of section .text:
+ 80074 41b20+ 6fae0c00 0+  .*
+Contents of section .got:
+ 82080 0+ 0+ 0+ 90200800  .*
+Contents of section .data:
+ 82090 0+             .*
Index: ld-cris/tls-gc-76.s
===================================================================
RCS file: ld-cris/tls-gc-76.s
diff -N ld-cris/tls-gc-76.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gc-76.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,23 @@
+	.text
+	.global	gc76fn
+	.type	gc76fn,@function
+gc76fn:
+	move.d	gc76var:GOT,$r10
+.Lfe:
+	.size	gc76fn,.Lfe-gc76fn
+
+	.data
+	.type	gc76var,@object
+	.size	gc76var,4
+gc76var:
+	.dword 0
+
+	.section .text.2,"ax"
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.d x:DTPREL,$r10
+	move.d x:DTPREL,$r10
+.Lfe2:
+	.size	tlsdsofn,.Lfe2-tlsdsofn
Index: ld-cris/tls-gd-1.d
===================================================================
RCS file: ld-cris/tls-gd-1.d
diff -N ld-cris/tls-gd-1.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-1.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-gd-1.s
+#source: tls128.s
+#source: tls-x.s
+#objdump: -s -t -R -p -T
+
+# DSO with a single R_CRIS_16_GOT_GD.  Check that we have proper
+# NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1a0 memsz 0x0+1a0 flags r-x
+    LOAD off    0x0+1a0 vaddr 0x0+21a0 paddr 0x0+21a0 align 2\*\*13
+         filesz 0x0+108 memsz 0x0+108 flags rw-
+ DYNAMIC off    0x0+224 vaddr 0x0+2224 paddr 0x0+2224 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1a0 vaddr 0x0+21a0 paddr 0x0+21a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+25
+  SYMENT               0x0+10
+  RELA                 0x0+190
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+80 g    D  \.tdata	0+4 x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22a0 R_CRIS_DTP        x
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 019c 5fae0c00                             .*
+#...
+Contents of section \.got:
+ 2294 24220+ 0+ 0+ 0+  .*
+ 22a4 0+                             .*
Index: ld-cris/tls-gd-1.s
===================================================================
RCS file: ld-cris/tls-gd-1.s
diff -N ld-cris/tls-gd-1.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-1.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn0
+	.type	tlsdsofn0,@function
+	.p2align 1
+tlsdsofn0:
+	move.w x:GDGOTREL16,$r10
+.Lfe:
+	.size	tlsdsofn0,.Lfe-tlsdsofn0
Index: ld-cris/tls-gd-1h.d
===================================================================
RCS file: ld-cris/tls-gd-1h.d
diff -N ld-cris/tls-gd-1h.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-1h.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,50 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-gd-1.s
+#source: tls128g.s
+#source: tls-hx.s
+#objdump: -s -t -R -p
+
+# DSO with a single R_CRIS_16_GOT_GD against a hidden symbol.  Check
+# that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1a4 memsz 0x0+1a4 flags r-x
+    LOAD off    0x0+1a4 vaddr 0x0+21a4 paddr 0x0+21a4 align 2\*\*13
+         filesz 0x0+108 memsz 0x0+108 flags rw-
+ DYNAMIC off    0x0+228 vaddr 0x0+2228 paddr 0x0+2228 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1a4 vaddr 0x0+21a4 paddr 0x0+21a4 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+2a
+  SYMENT               0x0+10
+  RELA                 0x0+194
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 l       \.tdata	0+4 \.hidden x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22a4 R_CRIS_DTP        \*ABS\*\+0x0+80
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01a0 5fae0c00                             .*
+#...
+Contents of section \.got:
+ 2298 28220+ 0+ 0+ 0+  .*
+ 22a8 0+                             .*
Index: ld-cris/tls-gd-2.d
===================================================================
RCS file: ld-cris/tls-gd-2.d
diff -N ld-cris/tls-gd-2.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-2.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-gd-2.s
+#source: tls128g.s
+#source: tls-x.s
+#objdump: -s -t -R -p -T
+
+# DSO with a single R_CRIS_32_GOT_GD.  Check that we have proper
+# NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1bc memsz 0x0+1bc flags r-x
+    LOAD off    0x0+1bc vaddr 0x0+21bc paddr 0x0+21bc align 2\*\*13
+         filesz 0x0+108 memsz 0x0+108 flags rw-
+ DYNAMIC off    0x0+240 vaddr 0x0+2240 paddr 0x0+2240 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1bc vaddr 0x0+21bc paddr 0x0+21bc align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+17c
+  SYMTAB               0x0+ec
+  STRSZ                0x0+2c
+  SYMENT               0x0+10
+  RELA                 0x0+1a8
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+80 g    D  \.tdata	0+4 x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22bc R_CRIS_DTP        x
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01b4 6fae0c00 00000000              .*
+#...
+Contents of section \.got:
+ 22b0 40220+ 0+ 0+ 0+  .*
+ 22c0 0+                             .*
Index: ld-cris/tls-gd-2.s
===================================================================
RCS file: ld-cris/tls-gd-2.s
diff -N ld-cris/tls-gd-2.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-2.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsdsofn2
+	.type	tlsdsofn2,@function
+	.p2align 1
+tlsdsofn2:
+	move.d x:GDGOTREL,$r10
+.Lfe2:
+	.size	tlsdsofn2,.Lfe2-tlsdsofn2
+
Index: ld-cris/tls-gd-2h.d
===================================================================
RCS file: ld-cris/tls-gd-2h.d
diff -N ld-cris/tls-gd-2h.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-2h.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,50 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-gd-2.s
+#source: tls128g.s
+#source: tls-hx.s
+#objdump: -s -t -R -p
+
+# DSO with a single R_CRIS_32_GOT_GD against a hidden symbol.  Check
+# that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1a8 memsz 0x0+1a8 flags r-x
+    LOAD off    0x0+1a8 vaddr 0x0+21a8 paddr 0x0+21a8 align 2\*\*13
+         filesz 0x0+108 memsz 0x0+108 flags rw-
+ DYNAMIC off    0x0+22c vaddr 0x0+222c paddr 0x0+222c align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1a8 vaddr 0x0+21a8 paddr 0x0+21a8 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+2a
+  SYMENT               0x0+10
+  RELA                 0x0+194
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 l       \.tdata	0+4 \.hidden x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22a8 R_CRIS_DTP        \*ABS\*\+0x0+80
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01a0 6fae0c00 00000000              .*
+#...
+Contents of section \.got:
+ 229c 2c220+ 0+ 0+ 0+  .*
+ 22ac 0+                             .*
Index: ld-cris/tls-gd-3.d
===================================================================
RCS file: ld-cris/tls-gd-3.d
diff -N ld-cris/tls-gd-3.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-3.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,39 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-gd-3.s
+#source: tls-x.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a single R_CRIS_32_GD.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82124 00000000 00000000 00000000 01000000  .*
+ 82134 80000000                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn>:
+   80098:	6fae 3021 0800      	move\.d [^>]+>,\$r10
+#...
Index: ld-cris/tls-gd-3.s
===================================================================
RCS file: ld-cris/tls-gd-3.s
diff -N ld-cris/tls-gd-3.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-3.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsfn
+	.type	tlsfn,@function
+	.p2align 1
+tlsfn:
+	move.d x:GD,$r10
+.Lfe1:
+	.size	tlsfn,.Lfe1-tlsfn
Index: ld-cris/tls-gd-3h.d
===================================================================
RCS file: ld-cris/tls-gd-3h.d
diff -N ld-cris/tls-gd-3h.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gd-3h.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,39 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-gd-3.s
+#source: tls-hx.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a single R_CRIS_32_GD against a hidden symbol.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 \.hidden x
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82124 00000000 00000000 00000000 01000000  .*
+ 82134 80000000                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn>:
+   80098:	6fae 3021 0800      	move\.d [^>]+>,\$r10
+#...
Index: ld-cris/tls-gdgotrelm.s
===================================================================
RCS file: ld-cris/tls-gdgotrelm.s
diff -N ld-cris/tls-gdgotrelm.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gdgotrelm.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,28 @@
+	.text
+
+	.ifndef r
+	.set r,1
+	.endif
+
+	.macro doit
+	.global	tlsdsofngdgotrelm\@
+	.type	tlsdsofngdgotrelm\@,@function
+	.p2align 1
+tlsdsofngdgotrelm\@:
+	move.w x\@:GDGOTREL16,$r10
+.Lfe\@:
+	.size	tlsdsofngdgotrelm\@,.Lfe\@-tlsdsofngdgotrelm\@
+
+	.globl x\@
+	.section	.tdata,"awT",@progbits
+	.p2align 0
+	.type	x\@, @object
+	.size	x\@, 1
+x\@:
+	.byte	40
+	.previous
+	.endm
+
+	.rept r
+	doit
+	.endr
Index: ld-cris/tls-global-74.d
===================================================================
RCS file: ld-cris/tls-global-74.d
diff -N ld-cris/tls-global-74.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-global-74.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,28 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-gd-2.s
+#source: tls-ie-10.s
+#source: tls-gd-1.s
+#source: tls-ie-8.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD, a R_CRIS_16_GOT_GD, a
+# R_CRIS_32_GOT_TPREL and a R_CRIS_16_GOT_TPREL against the same
+# symbol.  Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x0+4 memsz 0x0+4 flags r--
+#...
+Contents of section .text:
+ 80094 41b20000 6fae1000 0+ 6fae0c0+  .*
+ 800a4 0+ 5fae1000 5fae0c00        .*
+#...
+Contents of section \.got:
+ 820b4 0+ 0+ 0+ 0+  .*
+ 820c4 010+ 0+              .*
Index: ld-cris/tls-gottprelm.s
===================================================================
RCS file: ld-cris/tls-gottprelm.s
diff -N ld-cris/tls-gottprelm.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-gottprelm.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,28 @@
+	.text
+
+	.ifndef r
+	.set r,1
+	.endif
+
+	.macro doit
+	.global	tlsdsofngottprelm\@
+	.type	tlsdsofngottprelm\@,@function
+	.p2align 1
+tlsdsofngottprelm\@:
+	move.w x\@:TPOFFGOT16,$r10
+.Lfe\@:
+	.size	tlsdsofngottprelm\@,.Lfe\@-tlsdsofngottprelm\@
+
+	.globl x\@
+	.section	.tdata,"awT",@progbits
+	.p2align 0
+	.type	x\@, @object
+	.size	x\@, 1
+x\@:
+	.byte	40
+	.previous
+	.endm
+
+	.rept r
+	doit
+	.endr
Index: ld-cris/tls-hx.s
===================================================================
RCS file: ld-cris/tls-hx.s
diff -N ld-cris/tls-hx.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-hx.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.hidden	x
+	.globl x
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	x, @object
+	.size	x, 4
+x:
+	.long	40
Index: ld-cris/tls-hx1x2.s
===================================================================
RCS file: ld-cris/tls-hx1x2.s
diff -N ld-cris/tls-hx1x2.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-hx1x2.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,15 @@
+	.hidden	x1
+	.globl x1
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	x1, @object
+	.size	x1, 4
+x1:
+	.long	41
+	.hidden	x2
+	.globl x2
+	.p2align 2
+	.type	x2, @object
+	.size	x2, 4
+x2:
+	.long	42
Index: ld-cris/tls-ie-10.d
===================================================================
RCS file: ld-cris/tls-ie-10.d
diff -N ld-cris/tls-ie-10.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-10.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ie-10.s
+#source: tls128g.s
+#source: tls-x.s
+#objdump: -s -t -R -p -T
+
+# DSO with a single R_CRIS_32_GOT_TPREL.  Check that we have proper
+# NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1c0 memsz 0x0+1c0 flags r-x
+    LOAD off    0x0+1c0 vaddr 0x0+21c0 paddr 0x0+21c0 align 2\*\*13
+         filesz 0x0+10c memsz 0x0+10c flags rw-
+ DYNAMIC off    0x0+244 vaddr 0x0+2244 paddr 0x0+2244 align 2\*\*2
+         filesz 0x0+78 memsz 0x0+78 flags rw-
+     TLS off    0x0+1c0 vaddr 0x0+21c0 paddr 0x0+21c0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+17c
+  SYMTAB               0x0+ec
+  STRSZ                0x0+2d
+  SYMENT               0x0+10
+  RELA                 0x0+1ac
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+  FLAGS                0x0+10
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+80 g    D  \.tdata	0+4 x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22c8 R_CRIS_32_TPREL   x
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01b8 6fae0c00 00000000                    .*
+#...
+Contents of section \.got:
+ 22bc 44220+ 0+ 0+ 0+  .*
Index: ld-cris/tls-ie-10.s
===================================================================
RCS file: ld-cris/tls-ie-10.s
diff -N ld-cris/tls-ie-10.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-10.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn10
+	.type	tlsdsofn10,@function
+	.p2align 1
+tlsdsofn10:
+	move.d x:TPOFFGOT,$r10
+.Lfe10:
+	.size	tlsdsofn10,.Lfe10-tlsdsofn10
Index: ld-cris/tls-ie-11.d
===================================================================
RCS file: ld-cris/tls-ie-11.d
diff -N ld-cris/tls-ie-11.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-11.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,60 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ie-11.s
+#source: tls128g.s
+#source: tls-x1x2.s
+#objdump: -s -t -R -p -T
+
+# DSO with two R_CRIS_32_GOT_TPREL against different symbols.  Check
+# that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1e4 memsz 0x0+1e4 flags r-x
+    LOAD off    0x0+1e4 vaddr 0x0+21e4 paddr 0x0+21e4 align 2\*\*13
+         filesz 0x0+114 memsz 0x0+114 flags rw-
+ DYNAMIC off    0x0+26c vaddr 0x0+226c paddr 0x0+226c align 2\*\*2
+         filesz 0x0+78 memsz 0x0+78 flags rw-
+     TLS off    0x0+1e4 vaddr 0x0+21e4 paddr 0x0+21e4 align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+190
+  SYMTAB               0x0+f0
+  STRSZ                0x0+2f
+  SYMENT               0x0+10
+  RELA                 0x0+1c0
+  RELASZ               0x0+18
+  RELAENT              0x0+c
+  FLAGS                0x0+10
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+84 g       \.tdata	0+4 x2
+#...
+0+80 g       \.tdata	0+4 x1
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+84 g    D  \.tdata	0+4 x2
+#...
+0+80 g    D  \.tdata	0+4 x1
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22f0 R_CRIS_32_TPREL   x2
+0+22f4 R_CRIS_32_TPREL   x1
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01d8 6fae1000 00006fbe 0c000000           .*
+#...
+Contents of section \.got:
+ 22e4 6c220+ 0+ 0+ 0+  .*
+ 22f4 00000000                             .*
Index: ld-cris/tls-ie-11.s
===================================================================
RCS file: ld-cris/tls-ie-11.s
diff -N ld-cris/tls-ie-11.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-11.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.d x1:TPOFFGOT,$r10
+	move.d x2:TPOFFGOT,$r11
+.Lfe11:
+	.size	tlsdsofn,.Lfe11-tlsdsofn
Index: ld-cris/tls-ie-8.d
===================================================================
RCS file: ld-cris/tls-ie-8.d
diff -N ld-cris/tls-ie-8.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-8.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ie-8.s
+#source: tls128g.s
+#source: tls-x.s
+#objdump: -s -t -R -p -T
+
+# DSO with a single R_CRIS_16_GOT_TPREL.  Check that we have proper
+# NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1b8 memsz 0x0+1b8 flags r-x
+    LOAD off    0x0+1b8 vaddr 0x0+21b8 paddr 0x0+21b8 align 2\*\*13
+         filesz 0x0+10c memsz 0x0+10c flags rw-
+ DYNAMIC off    0x0+23c vaddr 0x0+223c paddr 0x0+223c align 2\*\*2
+         filesz 0x0+78 memsz 0x0+78 flags rw-
+     TLS off    0x0+1b8 vaddr 0x0+21b8 paddr 0x0+21b8 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+17c
+  SYMTAB               0x0+ec
+  STRSZ                0x0+2b
+  SYMENT               0x0+10
+  RELA                 0x0+1a8
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+  FLAGS                0x0+10
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+80 g    D  \.tdata	0+4 x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22c0 R_CRIS_32_TPREL   x
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01b4 5fae0c00                             .*
+#...
+Contents of section \.got:
+ 22b4 3c220+ 0+ 0+ 0+  .*
Index: ld-cris/tls-ie-8.s
===================================================================
RCS file: ld-cris/tls-ie-8.s
diff -N ld-cris/tls-ie-8.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-8.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.w x:TPOFFGOT16,$r10
+.Lfe8:
+	.size	tlsdsofn,.Lfe8-tlsdsofn
Index: ld-cris/tls-ie-9.d
===================================================================
RCS file: ld-cris/tls-ie-9.d
diff -N ld-cris/tls-ie-9.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-9.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,60 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ie-9.s
+#source: tls128g.s
+#source: tls-x1x2.s
+#objdump: -s -t -R -p -T
+
+# DSO with two R_CRIS_16_GOT_TPREL against different symbols.  Check
+# that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1e0 memsz 0x0+1e0 flags r-x
+    LOAD off    0x0+1e0 vaddr 0x0+21e0 paddr 0x0+21e0 align 2\*\*13
+         filesz 0x0+114 memsz 0x0+114 flags rw-
+ DYNAMIC off    0x0+268 vaddr 0x0+2268 paddr 0x0+2268 align 2\*\*2
+         filesz 0x0+78 memsz 0x0+78 flags rw-
+     TLS off    0x0+1e0 vaddr 0x0+21e0 paddr 0x0+21e0 align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+190
+  SYMTAB               0x0+f0
+  STRSZ                0x0+30
+  SYMENT               0x0+10
+  RELA                 0x0+1c0
+  RELASZ               0x0+18
+  RELAENT              0x0+c
+  FLAGS                0x0+10
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+84 g       \.tdata	0+4 x2
+#...
+0+80 g       \.tdata	0+4 x1
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+84 g    D  \.tdata	0+4 x2
+#...
+0+80 g    D  \.tdata	0+4 x1
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22ec R_CRIS_32_TPREL   x2
+0+22f0 R_CRIS_32_TPREL   x1
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01d8 5fae1000 5fbe0c00                    .*
+#...
+Contents of section \.got:
+ 22e0 68220+ 0+ 0+ 0+  .*
+ 22f0 00000000                             .*
Index: ld-cris/tls-ie-9.s
===================================================================
RCS file: ld-cris/tls-ie-9.s
diff -N ld-cris/tls-ie-9.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ie-9.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsdsofn9
+	.type	tlsdsofn9,@function
+	.p2align 1
+tlsdsofn9:
+	move.w x1:TPOFFGOT16,$r10
+	move.w x2:TPOFFGOT16,$r11
+.Lfe9:
+	.size	tlsdsofn9,.Lfe9-tlsdsofn9
Index: ld-cris/tls-ld-4.d
===================================================================
RCS file: ld-cris/tls-ld-4.d
diff -N ld-cris/tls-ld-4.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-4.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,50 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ld-4.s
+#source: tls128g.s
+#source: tls-hx.s
+#objdump: -s -t -R -p
+
+# DSO with a single R_CRIS_16_DTPREL against a hidden symbol.  Check
+# that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1a4 memsz 0x0+1a4 flags r-x
+    LOAD off    0x0+1a4 vaddr 0x0+21a4 paddr 0x0+21a4 align 2\*\*13
+         filesz 0x0+108 memsz 0x0+108 flags rw-
+ DYNAMIC off    0x0+228 vaddr 0x0+2228 paddr 0x0+2228 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1a4 vaddr 0x0+21a4 paddr 0x0+21a4 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+29
+  SYMENT               0x0+10
+  RELA                 0x0+194
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 l       \.tdata	0+4 \.hidden x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22a4 R_CRIS_DTPMOD     \*ABS\*
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01a0 5fae8000                             .*
+#...
+Contents of section \.got:
+ 2298 28220+ 0+ 0+ 0+  .*
+ 22a8 0+                             .*
Index: ld-cris/tls-ld-4.s
===================================================================
RCS file: ld-cris/tls-ld-4.s
diff -N ld-cris/tls-ld-4.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-4.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.w x:DTPREL16,$r10
+.Lfe1:
+	.size	tlsdsofn,.Lfe1-tlsdsofn
Index: ld-cris/tls-ld-5.d
===================================================================
RCS file: ld-cris/tls-ld-5.d
diff -N ld-cris/tls-ld-5.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-5.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,51 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ld-5.s
+#source: tls128g.s
+#source: tls-hx1x2.s
+#objdump: -s -t -R -p
+
+# DSO with two R_CRIS_16_DTPRELs against different hidden symbols.
+# Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1a8 memsz 0x0+1a8 flags r-x
+    LOAD off    0x0+1a8 vaddr 0x0+21a8 paddr 0x0+21a8 align 2\*\*13
+         filesz 0x0+10c memsz 0x0+10c flags rw-
+ DYNAMIC off    0x0+230 vaddr 0x0+2230 paddr 0x0+2230 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1a8 vaddr 0x0+21a8 paddr 0x0+21a8 align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+29
+  SYMENT               0x0+10
+  RELA                 0x0+194
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+84 l       \.tdata	0+4 \.hidden x2
+0+80 l       \.tdata	0+4 \.hidden x1
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22ac R_CRIS_DTPMOD     \*ABS\*
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01a0 5fae8000 5fbe8400              .*
+#...
+Contents of section \.got:
+ 22a0 30220+ 0+ 0+ 0+  .*
+ 22b0 0+                             .*
Index: ld-cris/tls-ld-5.s
===================================================================
RCS file: ld-cris/tls-ld-5.s
diff -N ld-cris/tls-ld-5.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-5.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,10 @@
+	.text
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.w x1:DTPREL16,$r10
+	move.w x2:DTPREL16,$r11
+.Lfe5:
+	.size	tlsdsofn,.Lfe5-tlsdsofn
+
Index: ld-cris/tls-ld-6.d
===================================================================
RCS file: ld-cris/tls-ld-6.d
diff -N ld-cris/tls-ld-6.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-6.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,50 @@
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux
+#source: tls128g.s
+#source: tls-ld-6.s
+#source: tls-hx.s
+#objdump: -s -t -R -p
+
+# DSO with a single R_CRIS_32_DTPREL against a hidden symbol.  Check
+# that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1a8 memsz 0x0+1a8 flags r-x
+    LOAD off    0x0+1a8 vaddr 0x0+21a8 paddr 0x0+21a8 align 2\*\*13
+         filesz 0x0+108 memsz 0x0+108 flags rw-
+ DYNAMIC off    0x0+22c vaddr 0x0+222c paddr 0x0+222c align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1a8 vaddr 0x0+21a8 paddr 0x0+21a8 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+29
+  SYMENT               0x0+10
+  RELA                 0x0+194
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+80 l       \.tdata	0+4 \.hidden x
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22a8 R_CRIS_DTPMOD     \*ABS\*
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01a0 6fae8000 00000000              .*
+#...
+Contents of section \.got:
+ 229c 2c220+ 0+ 0+ 0+  .*
+ 22ac 0+                             .*
Index: ld-cris/tls-ld-6.s
===================================================================
RCS file: ld-cris/tls-ld-6.s
diff -N ld-cris/tls-ld-6.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-6.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.d x:DTPREL,$r10
+.Lfe6:
+	.size	tlsdsofn,.Lfe6-tlsdsofn
Index: ld-cris/tls-ld-7.d
===================================================================
RCS file: ld-cris/tls-ld-7.d
diff -N ld-cris/tls-ld-7.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-7.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,51 @@
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#source: tls-ld-7.s
+#source: tls128g.s
+#source: tls-hx1x2.s
+#objdump: -s -t -R -p
+
+# DSO with two R_CRIS_32_DTPRELs against different hidden symbols.
+# Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+1ac memsz 0x0+1ac flags r-x
+    LOAD off    0x0+1ac vaddr 0x0+21ac paddr 0x0+21ac align 2\*\*13
+         filesz 0x0+10c memsz 0x0+10c flags rw-
+ DYNAMIC off    0x0+234 vaddr 0x0+2234 paddr 0x0+2234 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+1ac vaddr 0x0+21ac paddr 0x0+21ac align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+168
+  SYMTAB               0x0+e8
+  STRSZ                0x0+29
+  SYMENT               0x0+10
+  RELA                 0x0+194
+  RELASZ               0x0+c
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+84 l       \.tdata	0+4 \.hidden x2
+0+80 l       \.tdata	0+4 \.hidden x1
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+22b0 R_CRIS_DTPMOD     \*ABS\*
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01a0 6fae80+ 0+6fbe 840+     .*
+#...
+Contents of section \.got:
+ 22a4 34220+ 0+ 0+ 0+  .*
+ 22b4 0+                             .*
Index: ld-cris/tls-ld-7.s
===================================================================
RCS file: ld-cris/tls-ld-7.s
diff -N ld-cris/tls-ld-7.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ld-7.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsdsofn
+	.type	tlsdsofn,@function
+	.p2align 1
+tlsdsofn:
+	move.d x1:DTPREL,$r10
+	move.d x2:DTPREL,$r11
+.Lfe7:
+	.size	tlsdsofn,.Lfe7-tlsdsofn
Index: ld-cris/tls-ldgd-14.d
===================================================================
RCS file: ld-cris/tls-ldgd-14.d
diff -N ld-cris/tls-ldgd-14.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgd-14.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,71 @@
+#source: tls128g.s
+#source: tls-ld-5.s
+#source: tls-gd-1.s
+#source: tls-ldgd-14.s
+#source: tls-x.s
+#source: tls-z.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#objdump: -s -t -R -p -T
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_16_GOT_GD and two R_CRIS_16_DTPRELs against different
+# variables in a DSO.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+230 memsz 0x0+230 flags r-x
+    LOAD off    0x0+230 vaddr 0x0+2230 paddr 0x0+2230 align 2\*\*13
+         filesz 0x0+124 memsz 0x0+124 flags rw-
+ DYNAMIC off    0x0+2c0 vaddr 0x0+22c0 paddr 0x0+22c0 align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+230 vaddr 0x0+2230 paddr 0x0+2230 align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+1b8
+  SYMTAB               0x0+f8
+  STRSZ                0x0+42
+  SYMENT               0x0+10
+  RELA                 0x0+1fc
+  RELASZ               0x0+24
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+8c l       \.tdata	0+4 \.hidden x2
+#...
+0+88 l       \.tdata	0+4 \.hidden x1
+#...
+0+80 g       \.tdata	0+4 x
+#...
+0+84 g       \.tdata	0+4 z
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+80 g    D  \.tdata	0+4 x
+#...
+0+84 g    D  \.tdata	0+4 z
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+233c R_CRIS_DTPMOD     \*ABS\*
+0+2344 R_CRIS_DTP        x
+0+234c R_CRIS_DTP        z
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 0220 5fae8800 5fbe8c00 5fae1400 5fae1c00  .*
+Contents of section .tdata:
+#...
+Contents of section \.got:
+ 2330 c0220+ 0+ 0+ 0+  .*
+ 2340 0+ 0+ 0+ 0+  .*
+ 2350 0+                             .*
Index: ld-cris/tls-ldgd-14.s
===================================================================
RCS file: ld-cris/tls-ldgd-14.s
diff -N ld-cris/tls-ldgd-14.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgd-14.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsdsofn14
+	.type	tlsdsofn14,@function
+	.p2align 1
+tlsdsofn14:
+	move.w z:GDGOTREL16,$r10
+.Lfe14:
+	.size	tlsdsofn14,.Lfe14-tlsdsofn14
Index: ld-cris/tls-ldgd-15.d
===================================================================
RCS file: ld-cris/tls-ldgd-15.d
diff -N ld-cris/tls-ldgd-15.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgd-15.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,72 @@
+#source: tls128g.s
+#source: tls-ld-7.s
+#source: tls-gd-2.s
+#source: tls-ldgd-15.s
+#source: tls-x.s
+#source: tls-z.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux
+#objdump: -s -t -R -p -T
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_32_GOT_GD and two R_CRIS_32_DTPRELs against different
+# variables in a DSO.
+
+.*:     file format elf32-cris
+
+Program Header:
+    LOAD off    0x0+ vaddr 0x0+ paddr 0x0+ align 2\*\*13
+         filesz 0x0+23c memsz 0x0+23c flags r-x
+    LOAD off    0x0+23c vaddr 0x0+223c paddr 0x0+223c align 2\*\*13
+         filesz 0x0+124 memsz 0x0+124 flags rw-
+ DYNAMIC off    0x0+2cc vaddr 0x0+22cc paddr 0x0+22cc align 2\*\*2
+         filesz 0x0+70 memsz 0x0+70 flags rw-
+     TLS off    0x0+23c vaddr 0x0+223c paddr 0x0+223c align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+
+Dynamic Section:
+  HASH                 0x0+b4
+  STRTAB               0x0+1b8
+  SYMTAB               0x0+f8
+  STRSZ                0x0+42
+  SYMENT               0x0+10
+  RELA                 0x0+1fc
+  RELASZ               0x0+24
+  RELAENT              0x0+c
+private flags = 0:
+
+SYMBOL TABLE:
+#...
+0+8c l       \.tdata	0+4 \.hidden x2
+#...
+0+88 l       \.tdata	0+4 \.hidden x1
+#...
+0+80 g       \.tdata	0+4 x
+#...
+0+84 g       \.tdata	0+4 z
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+80 g    D  \.tdata	0+4 x
+#...
+0+84 g    D  \.tdata	0+4 z
+#...
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0+2348 R_CRIS_DTPMOD     \*ABS\*
+0+2350 R_CRIS_DTP        x
+0+2358 R_CRIS_DTP        z
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 0220 6fae8800 00006fbe 8c000000 6fae1400  .*
+ 0230 0+ 6fae1c00 0+           .*
+Contents of section .tdata:
+#...
+Contents of section \.got:
+ 233c cc220+ 0+ 0+ 0+  .*
+ 234c 0+ 0+ 0+ 0+  .*
+ 235c 0+                             .*
Index: ld-cris/tls-ldgd-15.s
===================================================================
RCS file: ld-cris/tls-ldgd-15.s
diff -N ld-cris/tls-ldgd-15.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgd-15.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsdsofn14
+	.type	tlsdsofn14,@function
+	.p2align 1
+tlsdsofn14:
+	move.d z:GDGOTREL,$r10
+.Lfe15:
+	.size	tlsdsofn14,.Lfe15-tlsdsofn14
+
Index: ld-cris/tls-ldgde-14.d
===================================================================
RCS file: ld-cris/tls-ldgde-14.d
diff -N ld-cris/tls-ldgde-14.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgde-14.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,61 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ld-5.s
+#source: tls-gd-1.s
+#source: tls-ldgd-14.s
+#source: tls-x.s
+#source: tls-z.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_16_GOT_GD and two R_CRIS_16_DTPRELs against different
+# variables, for an executable.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a8 vaddr 0x0+820a8 paddr 0x0+820a8 align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+  2 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+0+8c g       .tdata	00000004 \.hidden x2
+#...
+0+84 g       \.tdata	0+4 z
+#...
+0+88 g       .tdata	00000004 \.hidden x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82138 00000000 00000000 00000000 01000000  .*
+ 82148 00000000 01000000 80000000 01000000  .*
+ 82158 84000000                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsdsofn>:
+   80098:	5fae 8800           	move\.w 0x88,\$r10
+   8009c:	5fbe 8c00           	move\.w 0x8c,\$r11
+
+000800a0 <tlsdsofn0>:
+   800a0:	5fae 1400           	move\.w 0x14,\$r10
+
+000800a4 <tlsdsofn14>:
+   800a4:	5fae 1c00           	move\.w 0x1c,\$r10
Index: ld-cris/tls-ldgde-15.d
===================================================================
RCS file: ld-cris/tls-ldgde-15.d
diff -N ld-cris/tls-ldgde-15.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgde-15.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,61 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ld-7.s
+#source: tls-gd-2.s
+#source: tls-ldgd-15.s
+#source: tls-x.s
+#source: tls-z.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_32_GOT_GD and two R_CRIS_32_DTPRELs against different
+# variables, for an executable.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+b4 vaddr 0x0+820b4 paddr 0x0+820b4 align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+  2 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+0+8c g       .tdata	00000004 \.hidden x2
+#...
+0+84 g       \.tdata	0+4 z
+#...
+0+88 g       .tdata	00000004 \.hidden x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82144 00000000 00000000 00000000 01000000  .*
+ 82154 00000000 01000000 80000000 01000000  .*
+ 82164 84000000                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsdsofn>:
+   80098:	6fae 8800 0000      	move.d 88 <x1>,\$r10
+   8009e:	6fbe 8c00 0000      	move.d 8c <x2>,\$r11
+000800a4 <tlsdsofn2>:
+   800a4:	6fae 1400 0000      	move.d 14 <tls128\+0x14>,\$r10
+#...
+000800ac <tlsdsofn14>:
+   800ac:	6fae 1c00 0000      	move.d 1c <tls128\+0x1c>,\$r10
+#...
Index: ld-cris/tls-ldgdex-14.d
===================================================================
RCS file: ld-cris/tls-ldgdex-14.d
diff -N ld-cris/tls-ldgdex-14.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgdex-14.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ld-5.s
+#source: tls-gd-1.s
+#source: tls-ldgd-14.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: -m crislinux tmpdir/tls-dso-xz-1.so
+#objdump: -s -h -t -T -R -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_16_GOT_GD and two R_CRIS_16_DTPRELs against different
+# variables, for an executable, GD symbols defined elsewhere.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off  .*
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  NEEDED               tmpdir/tls-dso-xz-1.so
+#...
+private flags = 0:
+#...
+  8 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+         \*UND\*	0+ x
+#...
+0+         \*UND\*	0+ z
+#...
+DYNAMIC SYMBOL TABLE:
+0+      D  \*UND\*	0+ x
+0+      D  \*UND\*	0+ z
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0008230c R_CRIS_DTP        x
+00082314 R_CRIS_DTP        z
+
+Contents of section .interp:
+#...
+Contents of section \.text:
+ 801dc 41b20000 5fae8000 5fbe8400 5fae1400  .*
+ 801ec 5fae1c00                             .*
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 822f8 78220800 0+ 0+ 010+  .*
+ 82308 0+ 0+ 0+ 0+  .*
+ 82318 0+                             .*
Index: ld-cris/tls-ldgdex-15.d
===================================================================
RCS file: ld-cris/tls-ldgdex-15.d
diff -N ld-cris/tls-ldgdex-15.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgdex-15.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ld-7.s
+#source: tls-gd-2.s
+#source: tls-ldgd-15.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: -m crislinux tmpdir/tls-dso-xz-1.so
+#objdump: -s -h -t -T -R -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_32_GOT_GD and two R_CRIS_32_DTPRELs against different
+# variables, for an executable, GD symbols defined elsewhere.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off  .*
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  NEEDED               tmpdir/tls-dso-xz-1.so
+#...
+private flags = 0:
+#...
+  8 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+         \*UND\*	0+ x
+#...
+0+         \*UND\*	0+ z
+#...
+DYNAMIC SYMBOL TABLE:
+0+      D  \*UND\*	0+ x
+0+      D  \*UND\*	0+ z
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00082318 R_CRIS_DTP        x
+00082320 R_CRIS_DTP        z
+
+Contents of section \.interp:
+#...
+Contents of section \.text:
+ 801dc 41b20000 6fae8000 00006fbe 84000000  .*
+ 801ec 6fae1400 00000000 6fae1c00 00000000  .*
+Contents of section \.tdata:
+#...
+Contents of section \.got:
+ 82304 84220800 0+ 0+ 010+  .*
+ 82314 0+ 0+ 0+ 0+  .*
+ 82324 0+                             .*
Index: ld-cris/tls-ldgdx-14.d
===================================================================
RCS file: ld-cris/tls-ldgdx-14.d
diff -N ld-cris/tls-ldgdx-14.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgdx-14.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,55 @@
+#source: tls128.s
+#source: tls-ld-5.s
+#source: tls-gd-1.s
+#source: tls-ldgd-14.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux tmpdir/tls-dso-xz-1.so
+#objdump: -s -h -t -T -R -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_16_GOT_GD and two R_CRIS_16_DTPRELs against different
+# variables in a DSO, GD symbols defined elsewhere.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  NEEDED               tmpdir/tls-dso-xz-1.so
+#...
+private flags = 0:
+#...
+  7 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+         \*UND\*	0+ x
+#...
+0+         \*UND\*	0+ z
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+      D  \*UND\*	0+ x
+#...
+0+      D  \*UND\*	0+ z
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00002338 R_CRIS_DTPMOD     \*ABS\*
+00002340 R_CRIS_DTP        x
+00002348 R_CRIS_DTP        z
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 021c 5fae8000 5fbe8400 5fae1400 5fae1c00  .*
+Contents of section .tdata:
+#...
+Contents of section \.got:
+ 232c b4220+ 0+ 0+ 0+  .*
+ 233c 0+ 0+ 0+ 0+  .*
+ 234c 0+                             .*
Index: ld-cris/tls-ldgdx-15.d
===================================================================
RCS file: ld-cris/tls-ldgdx-15.d
diff -N ld-cris/tls-ldgdx-15.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ldgdx-15.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,56 @@
+#source: tls128.s
+#source: tls-ld-7.s
+#source: tls-gd-2.s
+#source: tls-ldgd-15.s
+#source: tls-hx1x2.s
+#as: --pic --no-underscore --em=criself
+#ld: --shared -m crislinux tmpdir/tls-dso-xz-1.so
+#objdump: -s -h -t -T -R -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for two
+# R_CRIS_32_GOT_GD and two R_CRIS_32_DTPRELs against different
+# variables in a DSO, GD symbols defined elsewhere.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x0+88 memsz 0x0+88 flags r--
+
+Dynamic Section:
+  NEEDED               tmpdir/tls-dso-xz-1.so
+#...
+private flags = 0:
+#...
+  7 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+         \*UND\*	0+ x
+#...
+0+         \*UND\*	0+ z
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+      D  \*UND\*	0+ x
+#...
+0+      D  \*UND\*	0+ z
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00002344 R_CRIS_DTPMOD     \*ABS\*
+0000234c R_CRIS_DTP        x
+00002354 R_CRIS_DTP        z
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 021c 6fae8000 00006fbe 84000000 6fae1400  .*
+ 022c 0+ 6fae1c00 0+           .*
+Contents of section .tdata:
+#...
+Contents of section \.got:
+ 2338 c0220+ 0+ 0+ 0+  .*
+ 2348 0+ 0+ 0+ 0+  .*
+ 2358 0+                             .*
Index: ld-cris/tls-le-12.d
===================================================================
RCS file: ld-cris/tls-le-12.d
diff -N ld-cris/tls-le-12.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-12.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,38 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-12.s
+#source: tls-z.s
+#as: --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p -h
+
+# Check that we have proper NPTL/TLS markings and no GOT for an
+# executable with a single R_CRIS_32_TPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 z
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn12>:
+   80098:	6fae 8000 0000      	move\.d 80 <z>,\$r10
+#...
Index: ld-cris/tls-le-12.s
===================================================================
RCS file: ld-cris/tls-le-12.s
diff -N ld-cris/tls-le-12.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-12.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsfn12
+	.type	tlsfn12,@function
+	.p2align 1
+tlsfn12:
+	move.d z:TPOFF,$r10
+.Lfe12:
+	.size	tlsfn12,.Lfe12-tlsfn12
Index: ld-cris/tls-le-12s.d
===================================================================
RCS file: ld-cris/tls-le-12s.d
diff -N ld-cris/tls-le-12s.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-12s.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,38 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-12s.s
+#source: tls-z.s
+#as: --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p -h
+
+# Check that we have proper NPTL/TLS markings and no GOT for an
+# executable with a single R_CRIS_16_TPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+9c vaddr 0x0+8209c paddr 0x0+8209c align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 z
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn12>:
+   80098:	5fac 8000           	movu\.w 0x80,\$r10
+#...
Index: ld-cris/tls-le-12s.s
===================================================================
RCS file: ld-cris/tls-le-12s.s
diff -N ld-cris/tls-le-12s.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-12s.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsfn12
+	.type	tlsfn12,@function
+	.p2align 1
+tlsfn12:
+	movu.w z:TPOFF16,$r10
+.Lfe12:
+	.size	tlsfn12,.Lfe12-tlsfn12
Index: ld-cris/tls-le-13.d
===================================================================
RCS file: ld-cris/tls-le-13.d
diff -N ld-cris/tls-le-13.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-13.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,41 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13.s
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p -h
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with a single R_CRIS_32_TPREL.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a4 vaddr 0x0+820a4 paddr 0x0+820a4 align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+84 g       \.tdata	0+4 x2
+#...
+0+80 g       \.tdata	0+4 x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn13>:
+   80098:	6fae 8000 0000      	move\.d 80 <x1>,\$r10
+   8009e:	6fae 8400 0000      	move\.d 84 <x2>,\$r10
+#...
Index: ld-cris/tls-le-13.s
===================================================================
RCS file: ld-cris/tls-le-13.s
diff -N ld-cris/tls-le-13.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-13.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsfn13
+	.type	tlsfn13,@function
+	.p2align 1
+tlsfn13:
+	move.d x1:TPOFF,$r10
+	move.d x2:TPOFF,$r10
+.Lfe13:
+	.size	tlsfn13,.Lfe13-tlsfn13
Index: ld-cris/tls-le-13s.d
===================================================================
RCS file: ld-cris/tls-le-13s.d
diff -N ld-cris/tls-le-13s.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-13s.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,40 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13s.s
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -d -s -t -r -p -h
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_16_TPREL, different symbols.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a0 vaddr 0x0+820a0 paddr 0x0+820a0 align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+private flags = 0:
+#...
+  1 .tdata .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+84 g       \.tdata	0+4 x2
+#...
+0+80 g       \.tdata	0+4 x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.tdata:
+#...
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn13>:
+   80098:	5fae 8000           	move\.w 0x80,\$r10
+   8009c:	5fae 8400           	move\.w 0x84,\$r10
Index: ld-cris/tls-le-13s.s
===================================================================
RCS file: ld-cris/tls-le-13s.s
diff -N ld-cris/tls-le-13s.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-le-13s.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+	.text
+	.global	tlsfn13
+	.type	tlsfn13,@function
+	.p2align 1
+tlsfn13:
+	move.w x1:TPOFF16,$r10
+	move.w x2:TPOFF16,$r10
+.Lfe13s:
+	.size	tlsfn13,.Lfe13s-tlsfn13
Index: ld-cris/tls-legd-16.d
===================================================================
RCS file: ld-cris/tls-legd-16.d
diff -N ld-cris/tls-legd-16.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-legd-16.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,59 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13.s
+#source: tls-gd-3.s
+#source: tls-legd-16.s
+#source: tls-x.s
+#source: tls-z.s
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_32_TPREL and two R_CRIS_32_GD, different
+# symbols.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+b4 vaddr 0x0+820b4 paddr 0x0+820b4 align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+private flags = 0:
+
+#...
+  2 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+0+8c g       \.tdata	0+4 x2
+#...
+0+84 g       \.tdata	0+4 z
+#...
+0+88 g       \.tdata	0+4 x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.got:
+ 82144 0+ 0+ 0+ 010+  .*
+ 82154 80+ 010+ 840+           .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn13>:
+   80098:	6fae 8800 0000      	move.d 88 <x1>,\$r10
+   8009e:	6fae 8c00 0000      	move.d 8c <x2>,\$r10
+
+000800a4 <tlsfn>:
+   800a4:	6fae 5021 0800      	move.d 82150 <_GLOBAL_OFFSET_TABLE_\+0xc>,\$r10
+#...
+
+000800ac <tlsfn16>:
+   800ac:	6fae 5821 0800      	move.d 82158 <_GLOBAL_OFFSET_TABLE_\+0x14>,\$r10
+#...
Index: ld-cris/tls-legd-16.s
===================================================================
RCS file: ld-cris/tls-legd-16.s
diff -N ld-cris/tls-legd-16.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-legd-16.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsfn16
+	.type	tlsfn15,@function
+	.p2align 1
+tlsfn16:
+	move.d z:GD,$r10
+.Lfe16:
+	.size	tlsfn16,.Lfe16-tlsfn16
Index: ld-cris/tls-legd-17.d
===================================================================
RCS file: ld-cris/tls-legd-17.d
diff -N ld-cris/tls-legd-17.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-legd-17.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,58 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13s.s
+#source: tls-gd-2.s --pic
+#source: tls-ldgd-14.s --pic
+#source: tls-x.s
+#source: tls-z.s
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_16_TPREL a R_CRIS_32_GOT_GD and a
+# R_CRIS_16_GOT_GD, different symbols.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+ac vaddr 0x0+820ac paddr 0x0+820ac align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+private flags = 0:
+
+#...
+  2 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata	0+4 x
+#...
+0+8c g       \.tdata	0+4 x2
+#...
+0+84 g       \.tdata	0+4 z
+#...
+0+88 g       \.tdata	0+4 x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.got:
+ 8213c 0+ 0+ 0+ 010+  .*
+ 8214c 80+ 010+ 840+           .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn13>:
+   80098:	5fae 8800           	move.w 0x88,\$r10
+   8009c:	5fae 8c00           	move.w 0x8c,\$r10
+
+000800a0 <tlsdsofn2>:
+   800a0:	6fae 0c00 0000      	move.d c <tls128\+0xc>,\$r10
+#...
+
+000800a8 <tlsdsofn14>:
+   800a8:	5fae 1400           	move.w 0x14,\$r10
Index: ld-cris/tls-legdx-16.d
===================================================================
RCS file: ld-cris/tls-legdx-16.d
diff -N ld-cris/tls-legdx-16.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-legdx-16.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,52 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13.s
+#source: tls-gd-3.s
+#source: tls-legd-16.s
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux tmpdir/tls-dso-xz-1.so
+#objdump: -s -h -t -T -R -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_32_TPREL and two R_CRIS_32_GD, different
+# symbols, GD symbols defined elsewhere.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x0+88 memsz 0x0+88 flags r--
+Dynamic Section:
+  NEEDED               tmpdir/tls-dso-xz-1.so
+#...
+private flags = 0:
+
+#...
+  8 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+         \*UND\*	0+ x
+#...
+0+         \*UND\*	0+ z
+#...
+DYNAMIC SYMBOL TABLE:
+0+      D  \*UND\*	0+ x
+0+      D  \*UND\*	0+ z
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00082310 R_CRIS_DTP        x
+00082318 R_CRIS_DTP        z
+
+Contents of section .interp:
+#...
+Contents of section \.text:
+ 801dc 41b20000 6fae8000 00006fae 84000000  .*
+ 801ec 6fae1023 08000000 6fae1823 08000000  .*
+#...
+Contents of section \.got:
+ 82304 84220800 0+ 0+ 0+  .*
+ 82314 0+ 0+ 0+           .*
Index: ld-cris/tls-legdx-17.d
===================================================================
RCS file: ld-cris/tls-legdx-17.d
diff -N ld-cris/tls-legdx-17.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-legdx-17.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,54 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13s.s
+#source: tls-gd-2.s --pic
+#source: tls-ldgd-14.s --pic
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux tmpdir/tls-dso-xz-1.so
+#objdump: -s -h -t -T -R -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_16_TPREL a R_CRIS_32_GOT_GD and a
+# R_CRIS_16_GOT_GD, different symbols, GD symbols defined elsewhere.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x0+88 memsz 0x0+88 flags r--
+Dynamic Section:
+  NEEDED               tmpdir/tls-dso-xz-1.so
+#...
+private flags = 0:
+
+#...
+  8 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+         \*UND\*	0+ x
+#...
+0+         \*UND\*	0+ z
+#...
+DYNAMIC SYMBOL TABLE:
+#...
+0+      D  \*UND\*	0+ x
+#...
+0+      D  \*UND\*	0+ z
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00082308 R_CRIS_DTP        x
+00082310 R_CRIS_DTP        z
+
+Contents of section .interp:
+#...
+Contents of section \.text:
+ 801dc 41b20000 5fae8000 5fae8400 6fae0c00  .*
+ 801ec 00000000 5fae1400                    .*
+#...
+Contents of section \.got:
+ 822fc 7c220800 0+ 0+ 0+  .*
+ 8230c 0+ 0+ 0+           .*
Index: ld-cris/tls-leie-18.d
===================================================================
RCS file: ld-cris/tls-leie-18.d
diff -N ld-cris/tls-leie-18.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-leie-18.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,47 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-le-13s.s
+#source: tls-ie-9.s --pic
+#source: tls-x1x2.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_16_TPREL and two R_CRIS_16_GOT_TPREL, no
+# same reloc to same symbol; two different symbols.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+a8 vaddr 0x0+820a8 paddr 0x0+820a8 align 2\*\*2
+         filesz 0x0+88 memsz 0x0+88 flags r--
+private flags = 0:
+#...
+  2 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+84 g       \.tdata	0+4 x2
+#...
+0+80 g       \.tdata	0+4 x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.got:
+ 82130 0+ 0+ 0+ 840+  .*
+ 82140 80+                             ....            
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn13>:
+   80098:	5fae 8000           	move.w 0x80,\$r10
+   8009c:	5fae 8400           	move.w 0x84,\$r10
+
+000800a0 <tlsdsofn9>:
+   800a0:	5fae 1000           	move.w 0x10,\$r10
+   800a4:	5fbe 0c00           	move.w 0xc,\$r11
Index: ld-cris/tls-leie-19.d
===================================================================
RCS file: ld-cris/tls-leie-19.d
diff -N ld-cris/tls-leie-19.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-leie-19.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,58 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-leie-19.s
+#source: tls-le-12.s
+#source: tls-ie-11.s --pic
+#source: tls-hx1x2.s
+#source: tls-x.s
+#source: tls-z.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -d -s -h -t -r -p
+
+# Check that we have proper NPTL/TLS markings and GOT for an
+# executable with two R_CRIS_32_TPREL and two R_CRIS_32_GOT_TPREL,
+# four different symbols.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off    0x0+b4 vaddr 0x0+820b4 paddr 0x0+820b4 align 2\*\*2
+         filesz 0x0+90 memsz 0x0+90 flags r--
+private flags = 0:
+#...
+  2 .got .*
+                  CONTENTS.*
+SYMBOL TABLE:
+#...
+0+88 g       .tdata	0+4 x
+#...
+0+84 g       \.tdata	0+4 \.hidden x2
+#...
+0+8c g       .tdata	0+4 z
+#...
+0+80 g       \.tdata	0+4 \.hidden x1
+#...
+Contents of section \.text:
+#...
+Contents of section \.got:
+ 82144 0+ 0+ 0+ 840+  .*
+ 82154 80+                             .*
+
+Disassembly of section \.text:
+
+00080094 <_start>:
+   80094:	41b2                	moveq 1,\$r11
+#...
+00080098 <tlsfn19>:
+   80098:	6fae 8800 0000      	move.d 88 <x>,\$r10
+#...
+
+000800a0 <tlsfn12>:
+   800a0:	6fae 8c00 0000      	move.d 8c <z>,\$r10
+#...
+
+000800a8 <tlsdsofn>:
+   800a8:	6fae 1000 0000      	move.d 10 <tls128\+0x10>,\$r10
+   800ae:	6fbe 0c00 0000      	move.d c <tls128\+0xc>,\$r11
Index: ld-cris/tls-leie-19.s
===================================================================
RCS file: ld-cris/tls-leie-19.s
diff -N ld-cris/tls-leie-19.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-leie-19.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+	.text
+	.global	tlsfn19
+	.type	tlsfn19,@function
+	.p2align 1
+tlsfn19:
+	move.d x:TPOFF,$r10
+.Lfe19:
+	.size	tlsfn19,.Lfe19-tlsfn19
Index: ld-cris/tls-local-54.d
===================================================================
RCS file: ld-cris/tls-local-54.d
diff -N ld-cris/tls-local-54.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-54.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,27 @@
+#source: tls-local-54.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: --shared -m crislinux
+#objdump: -s -t -R -p -T
+
+# A DSO with a R_CRIS_32_GOT_GD against a local symbol.
+# Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x00000080 memsz 0x00000080 flags r--
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00002288 R_CRIS_DTP        \*ABS\*\+0x0000002a
+
+Contents of section .hash:
+#...
+Contents of section \.text:
+ 0184 6fae0c00 00000000                    .*
+#...
+Contents of section \.got:
+ 227c 0c220000 0+ 0+ 0+  .*
+ 228c 0+                             .*
Index: ld-cris/tls-local-54.s
===================================================================
RCS file: ld-cris/tls-local-54.s
diff -N ld-cris/tls-local-54.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-54.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,3 @@
+ .include "tls-gd-2.s"
+ .include "tls128.s"
+ .set x, tls128+42
Index: ld-cris/tls-local-57.d
===================================================================
RCS file: ld-cris/tls-local-57.d
diff -N ld-cris/tls-local-57.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-57.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,23 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-local-57.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD against a local symbol.
+# Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x00000084 memsz 0x00000084 flags r--
+#...
+Contents of section .text:
+ 80094 41b20000 6fae0c00 0+           .*
+#...
+Contents of section \.got:
+ 82124 0+ 0+ 0+ 010+  .*
+ 82134 040+                             .*
Index: ld-cris/tls-local-57.s
===================================================================
RCS file: ld-cris/tls-local-57.s
diff -N ld-cris/tls-local-57.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-57.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,3 @@
+	.include "tls128.s"
+	.set x,tls128
+	.include "tls-gd-2.s"
Index: ld-cris/tls-local-58.d
===================================================================
RCS file: ld-cris/tls-local-58.d
diff -N ld-cris/tls-local-58.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-58.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,24 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-local-58.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD and a R_CRIS_16_GOT_GD against
+# the same local symbol.  Check that we have proper NPTL/TLS markings
+# and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x00000084 memsz 0x00000084 flags r--
+#...
+Contents of section .text:
+ 80094 41b20000 6fae0c00 00005fae 0c000000  .*
+#...
+Contents of section \.got:
+ 82128 0+ 0+ 0+ 010+  .*
+ 82138 040+                             .*
Index: ld-cris/tls-local-58.s
===================================================================
RCS file: ld-cris/tls-local-58.s
diff -N ld-cris/tls-local-58.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-58.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,4 @@
+	.include "tls128.s"
+	.set x,tls128
+	.include "tls-gd-2.s"
+	.include "tls-gd-1.s"
Index: ld-cris/tls-local-59.d
===================================================================
RCS file: ld-cris/tls-local-59.d
diff -N ld-cris/tls-local-59.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-59.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,25 @@
+#source: start1.s
+#source: tls-x.s
+#source: tls-local-59.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux
+#objdump: -s -t -r -p
+
+# An executable with a R_CRIS_32_GOT_GD, a R_CRIS_16_GOT_GD, a
+# R_CRIS_32_GOT_TPREL and a R_CRIS_16_GOT_TPREL against the same local
+# symbol.  Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x00000084 memsz 0x00000084 flags r--
+#...
+Contents of section .text:
+ 80094 41b20000 6fae1000 00006fae 0c000000  .*
+ 800a4 5fae1000 5fae0c00                    .*
+#...
+Contents of section \.got:
+ 82130 0+ 0+ 0+ 040+  .*
+ 82140 010+ 040+              .*
Index: ld-cris/tls-local-59.s
===================================================================
RCS file: ld-cris/tls-local-59.s
diff -N ld-cris/tls-local-59.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-59.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,6 @@
+	.include "tls128.s"
+	.set x,tls128
+	.include "tls-gd-2.s"
+	.include "tls-ie-10.s"
+	.include "tls-gd-1.s"
+	.include "tls-ie-8.s"
Index: ld-cris/tls-local-60.d
===================================================================
RCS file: ld-cris/tls-local-60.d
diff -N ld-cris/tls-local-60.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-60.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,33 @@
+#source: tls-x.s
+#source: tls-local-59.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux --shared
+#objdump: -s -t -r -p -R -T
+
+# A DSO with a R_CRIS_32_GOT_GD, a R_CRIS_16_GOT_GD, a
+# R_CRIS_32_GOT_TPREL and a R_CRIS_16_GOT_TPREL against the same local
+# symbol.  Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x00000084 memsz 0x00000084 flags r--
+#...
+  FLAGS                0x00000010
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0000231c R_CRIS_32_TPREL   \*ABS\*\+0x0+4
+00002320 R_CRIS_DTP        \*ABS\*\+0x0+4
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 0200 6fae1000 00006fae 0c000000 5fae1000  .*
+ 0210 5fae0c00                             .*
+#...
+Contents of section \.got:
+ 2310 98220+ 0+ 0+ 040+  .*
+ 2320 0+ 0+                    .*
Index: ld-cris/tls-local-61.d
===================================================================
RCS file: ld-cris/tls-local-61.d
diff -N ld-cris/tls-local-61.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-61.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,32 @@
+#source: tls-local-59.s
+#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#ld: -m crislinux --shared
+#objdump: -s -t -r -p -R -T
+
+# A DSO with a R_CRIS_32_GOT_GD, a R_CRIS_16_GOT_GD, a
+# R_CRIS_32_GOT_TPREL and a R_CRIS_16_GOT_TPREL against the same local
+# symbol.  Check that we have proper NPTL/TLS markings and GOT.
+
+.*:     file format elf32-cris
+
+Program Header:
+#...
+     TLS off .*
+         filesz 0x00000080 memsz 0x00000080 flags r--
+#...
+  FLAGS                0x00000010
+#...
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00002304 R_CRIS_32_TPREL   \*ABS\*
+00002308 R_CRIS_DTP        \*ABS\*
+
+Contents of section \.hash:
+#...
+Contents of section \.text:
+ 01ec 6fae1000 00006fae 0c000000 5fae1000  .*
+ 01fc 5fae0c00                             .*
+#...
+Contents of section \.got:
+ 22f8 80220+ 0+ 0+ 0+  .*
+ 2308 0+ 0+                    .*
Index: ld-cris/tls-local-63.d
===================================================================
RCS file: ld-cris/tls-local-63.d
diff -N ld-cris/tls-local-63.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-63.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,31 @@
+#source: tls-ie-8.s --pic
+#source: tls-hx.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#readelf: -a -x 6 -x 8 -x 5
+
+# A R_CRIS_16_GOT_TPREL in a DSO against a hidden symbol.  Make sure
+# the relocation, GOT, .text and .tdata have the right contents.
+
+#...
+Relocation section '.rela.dyn' at offset 0x.* contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+00002210  0000001c R_CRIS_32_TPREL[ ]+00+
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains 7 entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+Symbol table '.symtab' contains 16 entries:
+#...
+     .: 00000000     4 TLS     LOCAL  HIDDEN    6 x
+#...
+Hex dump of section '.text':
+  0x00000184 5fae0c00                            .*
+#...
+Hex dump of section '.tdata':
+  0x00002188 280+                            .*
+#...
+Hex dump of section '.got':
+  0x0+2204 8c210000 0+ 0+ 0+ .*
Index: ld-cris/tls-local-64.d
===================================================================
RCS file: ld-cris/tls-local-64.d
diff -N ld-cris/tls-local-64.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-local-64.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,37 @@
+#source: tls-ie-8.s --pic
+#source: tls128.s
+#source: tls-hx.s
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#readelf: -a -x 6 -x 8 -x 5
+
+# A R_CRIS_16_GOT_TPREL in a DSO against a hidden symbol, at an offset
+# into .data.  Make sure the relocation, GOT, .text and .tdata have
+# the right contents.
+
+#...
+Relocation section '.rela.dyn' at offset 0x.* contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+00002290  0000001c R_CRIS_32_TPREL[ ]+0+80
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains 7 entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+Symbol table '.symtab' contains 17 entries:
+#...
+    ..: 00000080     4 TLS     LOCAL  HIDDEN    6 x
+#...
+Hex dump of section '.text':
+  0x00000184 5fae0c00                            .*
+#...
+Hex dump of section '.tdata':
+  0x00002188 2f0+ 0+ 0+ 0+ .*
+  0x00002198 0+ 0+ 0+ 0+ .*
+#...
+  0x000021f8 0+ 0+ 0+ 0+ .*
+  0x00002208 280+                            .*
+#...
+Hex dump of section '.got':
+  0x0+2284 0c220000 0+ 0+ 80+ .*
Index: ld-cris/tls-ok-30.d
===================================================================
RCS file: ld-cris/tls-ok-30.d
diff -N ld-cris/tls-ok-30.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ok-30.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,29 @@
+#source: tls-gdgotrelm.s --defsym r=8191
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#objdump: -s -j .got -R
+
+# Verify that the first and last R_CRIS_16_GOT_GD entries are ok just
+# below the limit, in a DSO.  Beware, the order here is quite random,
+# supposedly depending on symbol hashes.
+
+.*:     file format elf32-cris
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+000b3910 R_CRIS_DTP        x2814
+#...
+000b8350 R_CRIS_DTP        x8190
+#...
+000c1308 R_CRIS_DTP        x0
+#...
+000c3900 R_CRIS_DTP        x1345
+
+Contents of section .got:
+ b3904 94380b00 00000000 00000000 00000000  .*
+ b3914 00000000 00000000 00000000 00000000  .*
+#...
+ c38e4 00000000 00000000 00000000 00000000  .*
+ c38f4 00000000 00000000 00000000 00000000  .*
+ c3904 00000000                             .*
+#PASS
Index: ld-cris/tls-ok-32.d
===================================================================
RCS file: ld-cris/tls-ok-32.d
diff -N ld-cris/tls-ok-32.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ok-32.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,23 @@
+#source: tls-dtprelm.s --defsym r=32767
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#objdump: -s -j .got -j .text -j .tdata -R
+
+# Check that a R_CRIS_16_DTPREL just below the theoretical limit
+# works, in a DSO.
+
+.*:     file format elf32-cris
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+0000a220 R_CRIS_DTPMOD     \*ABS\*
+
+Contents of section \.text:
+ 01a0 5faeff7f                             .*
+Contents of section \.tdata:
+ 21a4 2a2a2a2a 2a2a2a2a 2a2a2a2a 2a2a2a2a  .*
+#...
+ a194 2a2a2a2a 2a2a2a2a 2a2a2a2a 2a2a2a2a  .*
+Contents of section \.got:
+ a214 a4a10000 00000000 00000000 00000000  .*
+ a224 00000000                             .*
Index: ld-cris/tls-ok-34.d
===================================================================
RCS file: ld-cris/tls-ok-34.d
diff -N ld-cris/tls-ok-34.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ok-34.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,28 @@
+#source: tls-gottprelm.s --defsym r=8189
+#as: --no-underscore --em=criself --pic
+#ld: --shared -m crislinux
+#objdump: -s -j .got -R
+
+# Check that a R_CRIS_16_DTPREL just below the theoretical limit
+# works.  Verify that the first and last R_CRIS_16_GOT_TPREL entries
+# are ok, in a DSO.  Beware, the order here is quite random,
+# supposedly depending on symbol hashes.
+
+.*:     file format elf32-cris
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+000b3870 R_CRIS_32_TPREL   x2814
+#...
+000b485c R_CRIS_32_TPREL   x8188
+#...
+000ba564 R_CRIS_32_TPREL   x0
+#...
+000bb860 R_CRIS_32_TPREL   x1345
+
+Contents of section .got:
+ b3864 ec370b00 00000000 00000000 00000000  .*
+ b3874 00000000 00000000 00000000 00000000  .*
+#...
+ bb844 00000000 00000000 00000000 00000000  .*
+ bb854 00000000 00000000 00000000 00000000  .*
Index: ld-cris/tls-ok-36.d
===================================================================
RCS file: ld-cris/tls-ok-36.d
diff -N ld-cris/tls-ok-36.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-ok-36.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,16 @@
+#source: start1.s
+#source: tls-tprelm.s --defsym r=32767
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#objdump: -s -j .got -j .text -j .tdata
+
+# Check that a R_CRIS_16_TPREL just below the theoretical limit works.
+
+.*:     file format elf32-cris
+
+Contents of section \.text:
+ 80094 41b20000 5faeff7f                   .*
+Contents of section \.tdata:
+ 8209c 2a2a2a2a 2a2a2a2a 2a2a2a2a 2a2a2a2a .*
+#...
+ 8a08c 2a2a2a2a 2a2a2a2a 2a2a2a2a 2a2a2a2a .*
Index: ld-cris/tls-tprelm.s
===================================================================
RCS file: ld-cris/tls-tprelm.s
diff -N ld-cris/tls-tprelm.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-tprelm.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,26 @@
+	.text
+
+	.ifndef r
+	.set r,1
+	.endif
+
+	.global	tlsfntprelm
+	.type	tlsfntprelm,@function
+	.p2align 1
+tlsfntprelm:
+	move.w x:TPOFF16,$r10
+.Lfe:
+	.size	tlsfntprelm,.Lfe-tlsfntprelm
+
+	.globl z
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	z,@object
+	.size	z,r
+z:
+	.fill	r,1,42
+
+	.type	x,@object
+	.size	x,1
+x:
+	.byte 42
Index: ld-cris/tls-und-38.d
===================================================================
RCS file: ld-cris/tls-und-38.d
diff -N ld-cris/tls-und-38.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-und-38.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,27 @@
+#source: tls-gd-2.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#readelf: -a -x 7
+
+# Undefined reference for a R_CRIS_32_GOT_GD in a DSO.  Not an error;
+# it's ok for a DSO to have undefined references upon creation for
+# global symbols that can be overridden.  Just make sure GOT, dynsyms
+# and dynrelocs look right.
+
+#...
+Relocation section '.rela.dyn' at offset 0x.* contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+000021ec  00000217 R_CRIS_DTP        00000000   x \+ 0
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains . entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+     [0-9]: 00000000     0 TLS     GLOBAL DEFAULT  UND x
+#...
+Symbol table '.symtab' contains .. entries:
+#...
+Hex dump of section '.got':
+  0x0+21e0 70210000 00000000 00000000 00000000 .*
+  0x0+21f0 00000000                            .*
Index: ld-cris/tls-und-42.d
===================================================================
RCS file: ld-cris/tls-und-42.d
diff -N ld-cris/tls-und-42.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-und-42.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,26 @@
+#source: tls-ie-10.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#readelf: -a -x 7
+
+# Undefined reference for a R_CRIS_32_GOT_TPREL in a DSO.  Not an
+# error; it's ok for a DSO to have undefined references upon creation
+# for global symbols that can be overridden.  Just make sure GOT,
+# dynsyms and dynrelocs look right.
+
+#...
+Relocation section '.rela.dyn' at offset 0x.* contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+000021f4  0000021c R_CRIS_32_TPREL   0+   x \+ 0
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains . entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+     [0-9]: 00000000     0 TLS     GLOBAL DEFAULT  UND x
+#...
+Symbol table '.symtab' contains .. entries:
+#...
+Hex dump of section '.got':
+  0x0+21e8 70210000 00000000 00000000 00000000 .*
Index: ld-cris/tls-und-46.d
===================================================================
RCS file: ld-cris/tls-und-46.d
diff -N ld-cris/tls-und-46.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-und-46.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,27 @@
+#source: tls-gd-1.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#readelf: -a -x 7
+
+# Undefined reference for a R_CRIS_16_GOT_GD in a DSO.  Not an error;
+# it's ok for a DSO to have undefined references upon creation for
+# global symbols that can be overridden.  Just make sure GOT, dynsyms
+# and dynrelocs look right.
+
+#...
+Relocation section '.rela.dyn' at offset 0x.* contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+000021e8  00000217 R_CRIS_DTP        00000000   x \+ 0
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains . entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+     [0-9]: 00000000     0 TLS     GLOBAL DEFAULT  UND x
+#...
+Symbol table '.symtab' contains .. entries:
+#...
+Hex dump of section '.got':
+  0x0+21dc 6c210000 00000000 00000000 00000000 .*
+  0x0+21ec 00000000                            .*
Index: ld-cris/tls-und-50.d
===================================================================
RCS file: ld-cris/tls-und-50.d
diff -N ld-cris/tls-und-50.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-und-50.d	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,26 @@
+#source: tls-ie-8.s --pic
+#as: --no-underscore --em=criself
+#ld: -m crislinux --shared
+#readelf: -a -x 7
+
+# Undefined reference for a R_CRIS_16_GOT_TPREL in a DSO.  Not an
+# error; it's ok for a DSO to have undefined references upon creation
+# for global symbols that can be overridden.  Just make sure GOT,
+# dynsyms and dynrelocs look right.
+
+#...
+Relocation section '.rela.dyn' at offset 0x.* contains 1 entries:
+ Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
+000021ec  0000021c R_CRIS_32_TPREL   0+   x \+ 0
+
+There are no unwind sections in this file.
+
+Symbol table '.dynsym' contains . entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+     [0-9]: 00000000     0 TLS     GLOBAL DEFAULT  UND x
+#...
+Symbol table '.symtab' contains .. entries:
+#...
+Hex dump of section '.got':
+  0x0+21e0 68210000 00000000 00000000 00000000 .*
Index: ld-cris/tls-x.s
===================================================================
RCS file: ld-cris/tls-x.s
diff -N ld-cris/tls-x.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-x.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+	.globl x
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	x, @object
+	.size	x, 4
+x:
+	.long	40
Index: ld-cris/tls-x1x2.s
===================================================================
RCS file: ld-cris/tls-x1x2.s
diff -N ld-cris/tls-x1x2.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-x1x2.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,13 @@
+	.globl x1
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	x1, @object
+	.size	x1, 4
+x1:
+	.long	41
+	.globl x2
+	.p2align 2
+	.type	x2, @object
+	.size	x2, 4
+x2:
+	.long	42
Index: ld-cris/tls-z.s
===================================================================
RCS file: ld-cris/tls-z.s
diff -N ld-cris/tls-z.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls-z.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,7 @@
+	.globl z
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	z, @object
+	.size	z, 4
+z:
+	.long	42
Index: ld-cris/tls128.s
===================================================================
RCS file: ld-cris/tls128.s
diff -N ld-cris/tls128.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls128.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,8 @@
+; Just something allocating 128 bytes TLS data.
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.type	tls128, @object
+tls128:
+	.long	47
+	.fill	124,1,0
+	.size	tls128, 128
Index: ld-cris/tls128g.s
===================================================================
RCS file: ld-cris/tls128g.s
diff -N ld-cris/tls128g.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld-cris/tls128g.s	25 Nov 2008 03:44:43 -0000
@@ -0,0 +1,9 @@
+; Just something allocating 128 bytes TLS data, with the symbol being global.
+	.section	.tdata,"awT",@progbits
+	.p2align 2
+	.global tls128
+	.type	tls128, @object
+tls128:
+	.long	47
+	.fill	124,1,0
+	.size	tls128, 128

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]