summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShahab Vahedi <shahab@synopsys.com>2020-11-23 12:24:29 +0200
committerClaudiu Zissulescu <claziss@synopsys.com>2020-11-23 12:25:44 +0200
commite1b9725dfaf7a993fa06ee71ae72e6ded7470f1b (patch)
tree99862905edf5644e8bf9438ccbc90822046e9ce6
parenta3a02fe862f559fd80bedbb7050bd2346053e2ee (diff)
downloadbinutils-gdb-e1b9725dfaf7a993fa06ee71ae72e6ded7470f1b.tar.gz
ld: Make ARC's tls_ie-01 test more flexible
This is to address the regressions addressed by Nic [1]. The regular expression pattern for the tls_ie-01 test was too strict and raising false alarms. The new pattern only looks for matches that should be there AND ignores the boiler plates from the object dump. [1] New failures for ARC targets in linker testsuite https://sourceware.org/pipermail/binutils/2020-November/114177.html ld/ * testsuite/ld-arc/tls_ie-01.d: Use a more general pattern.
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/ld-arc/tls_ie-01.d63
2 files changed, 60 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 4686c592e4c..2ee87783bd2 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-23 Shahab Vahedi <shahab@synopsys.org>
+
+ * testsuite/ld-arc/tls_ie-01.d: Use a more general pattern.
+
2020-11-21 Nelson Chu <nelson.chu@sifive.com>
* emultempl/riscvelf.em (riscv_elf_before_allocation): Change
diff --git a/ld/testsuite/ld-arc/tls_ie-01.d b/ld/testsuite/ld-arc/tls_ie-01.d
index 319cb9e99d7..3b7b3249a7b 100644
--- a/ld/testsuite/ld-arc/tls_ie-01.d
+++ b/ld/testsuite/ld-arc/tls_ie-01.d
@@ -2,12 +2,61 @@
#as: -mcpu=arc700
#ld: -static
#objdump: -D -j .got
+#
+# sample outputs:
+# 1) baremetal toolchain (little endian)
+# ,-------------------------------------------------------.
+# |tmpdir/dump: file format elf32-littlearc |
+# | |
+# | |
+# |Disassembly of section .got: |
+# | |
+# |00002110 <_GLOBAL_OFFSET_TABLE_>: |
+# | ... |
+# | 211c: 08 00 00 00 .word 0x00000008|
+# | 2120: 0c 00 00 00 .word 0x0000000c|
+# `-------------------------------------------------------'
+#
+# 2) linux toolchain (little endian)
+# ,-------------------------------------------------------.
+# |tmpdir/dump: file format elf32-littlearc |
+# | |
+# | |
+# |Disassembly of section .got: |
+# | |
+# |000120a4 <.got>: |
+# | 120a4: 08 00 00 00 .word 0x00000008|
+# | 120a8: 0c 00 00 00 .word 0x0000000c|
+# `-------------------------------------------------------'
+#
+# 3) baremetal toolchain (big endian)
+# ,-------------------------------------------------------.
+# |tmpdir/dump: file format elf32-bigarc |
+# | |
+# | |
+# |Disassembly of section .got: |
+# | |
+# |00002110 <_GLOBAL_OFFSET_TABLE_>: |
+# | ... |
+# | 211c: 00 00 00 08 .word 0x00000008|
+# | 2120: 00 00 00 0c .word 0x0000000c|
+# `-------------------------------------------------------'
+#
+# 4) linux toolchain (big endian)
+# ,-------------------------------------------------------.
+# |tmpdir/dump: file format elf32-bigarc |
+# | |
+# | |
+# |Disassembly of section .got: |
+# | |
+# |00013ff4 <.got>: |
+# | 13ff4: 00 00 00 08 .word 0x00000008|
+# | 13ff8: 00 00 00 0c .word 0x0000000c|
+# `-------------------------------------------------------'
-[^:]+: file format elf32-.*arc
-
-
+#...
Disassembly of section \.got:
-[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_>:
-\s+...
-\s+[0-9a-f]+:\s+08 00 00 00.*
-\s+[0-9a-f]+:\s+0c 00 00 00.*
+#...
+\s+[0-9a-f]+:\s+[0-9a-f\s]+\.word\s+0x0+8
+\s+[0-9a-f]+:\s+[0-9a-f\s]+\.word\s+0x0+c
+#pass