* ld-cris/tls-err-77.d, ld-cris/tls-gc-79.d, ld-cris/tls-ie-8e.s,
authorHans-Peter Nilsson <hp@axis.com>
Sat, 20 Dec 2008 00:30:39 +0000 (00:30 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Sat, 20 Dec 2008 00:30:39 +0000 (00:30 +0000)
ld-cris/tls-ie-8e1.d: New tests.

ld/testsuite/ChangeLog
ld/testsuite/ld-cris/tls-err-77.d [new file with mode: 0644]
ld/testsuite/ld-cris/tls-gc-79.d [new file with mode: 0644]
ld/testsuite/ld-cris/tls-ie-8e.s [new file with mode: 0644]
ld/testsuite/ld-cris/tls-ie-8e1.d [new file with mode: 0644]

index daee5dc453126968ac6dc687ff4bba767c67e330..94215620e726820e7a52cb03a0eb9678522807cd 100644 (file)
@@ -1,3 +1,8 @@
+2008-12-20  Hans-Peter Nilsson  <hp@axis.com>
+
+       * ld-cris/tls-err-77.d, ld-cris/tls-gc-79.d, ld-cris/tls-ie-8e.s,
+       ld-cris/tls-ie-8e1.d: New tests.
+
 2008-12-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        * ld-i386/tlsld1.dd: Remove trailing white spaces after nop.
diff --git a/ld/testsuite/ld-cris/tls-err-77.d b/ld/testsuite/ld-cris/tls-err-77.d
new file mode 100644 (file)
index 0000000..9c714bf
--- /dev/null
@@ -0,0 +1,7 @@
+#source: tls-ie-8e.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_IE in input to a DSO is flagged as an error.
diff --git a/ld/testsuite/ld-cris/tls-gc-79.d b/ld/testsuite/ld-cris/tls-gc-79.d
new file mode 100644 (file)
index 0000000..37e8fce
--- /dev/null
@@ -0,0 +1,34 @@
+#source: start1.s
+#source: tls128.s
+#source: tls-ie-8e.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_IE, 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+           .*
diff --git a/ld/testsuite/ld-cris/tls-ie-8e.s b/ld/testsuite/ld-cris/tls-ie-8e.s
new file mode 100644 (file)
index 0000000..fc6e121
--- /dev/null
@@ -0,0 +1,8 @@
+       .text
+       .global tlsfn
+       .type   tlsfn,@function
+       .p2align 1
+tlsfn:
+       move.d x:IE,$r10
+.Lfe8:
+       .size   tlsfn,.Lfe8-tlsfn
diff --git a/ld/testsuite/ld-cris/tls-ie-8e1.d b/ld/testsuite/ld-cris/tls-ie-8e1.d
new file mode 100644 (file)
index 0000000..e2bcfd2
--- /dev/null
@@ -0,0 +1,42 @@
+#as: --no-underscore --em=criself
+#ld: -m crislinux
+#source: start1.s
+#source: tls-ie-8e.s
+#source: tls128g.s
+#source: tls-x.s
+#objdump: -d -s -h -t -r -p
+
+# Executable with a single R_CRIS_32_IE, defined in the executable.
+# Check that we have proper NPTL/TLS markings and a constant GOT.
+
+.*:     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:
+
+Sections:
+#...
+  2 .got[      ]+ 0+10 .*
+                  CONTENTS, ALLOC, LOAD, DATA
+
+SYMBOL TABLE:
+#...
+0+80 g       \.tdata   0+4 x
+#...
+Contents of section .text:
+ 80094 41b20000 6fae3021 08000000           .*
+#...
+Contents of section .got:
+ 82124 00000000 00000000 00000000 80000000  .*
+
+Disassembly of section .text:
+
+00080094 <_start>:
+   80094:      41b2                    moveq 1,\$r11
+#...
+00080098 <tlsfn>:
+   80098:      6fae 3021 0800          move.d 82130 <_GLOBAL_OFFSET_TABLE_\+0xc>,\$r10
+#pass