aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2013-06-04 19:24:10 +0000
committerRoland McGrath <roland@gnu.org>2013-06-04 19:24:10 +0000
commit9b4fce51f3c0aed948f47063b10d1db611523b22 (patch)
tree1055e4ff8a50c668df29317d00997003090d9453 /ld/testsuite
parentfafd78e9a53bb84d04697f3ad2f5a0e8c6063a76 (diff)
downloadgdb-9b4fce51f3c0aed948f47063b10d1db611523b22.zip
gdb-9b4fce51f3c0aed948f47063b10d1db611523b22.tar.gz
gdb-9b4fce51f3c0aed948f47063b10d1db611523b22.tar.bz2
ld/testsuite/
* ld-size/size.exp: For *-*-nacl* targets, use options_regsub(ld) to massage -m arguments into _nacl variants. * ld/testsuite/ld-size/size32-1-i386.d: Loosen regexps so they don't care what the exact addresses are. * ld/testsuite/ld-size/size32-1-x32.d: Likewise. * ld/testsuite/ld-size/size32-1-x86-64.d: Likewise. * ld/testsuite/ld-size/size32-2-i386.d: Likewise. * ld/testsuite/ld-size/size32-2-x32.d: Likewise. * ld/testsuite/ld-size/size32-2-x86-64.d: Likewise. * ld/testsuite/ld-size/size64-1-x32.d: Likewise. * ld/testsuite/ld-size/size64-1-x86-64.d: Likewise. * ld/testsuite/ld-size/size64-2-x32.d: Likewise. * ld/testsuite/ld-size/size64-2-x86-64.d: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog16
-rw-r--r--ld/testsuite/ld-size/size.exp9
-rw-r--r--ld/testsuite/ld-size/size32-1-i386.d18
-rw-r--r--ld/testsuite/ld-size/size32-1-x32.d18
-rw-r--r--ld/testsuite/ld-size/size32-1-x86-64.d18
-rw-r--r--ld/testsuite/ld-size/size32-2-i386.d14
-rw-r--r--ld/testsuite/ld-size/size32-2-x32.d14
-rw-r--r--ld/testsuite/ld-size/size32-2-x86-64.d14
-rw-r--r--ld/testsuite/ld-size/size64-1-x32.d20
-rw-r--r--ld/testsuite/ld-size/size64-1-x86-64.d20
-rw-r--r--ld/testsuite/ld-size/size64-2-x32.d16
-rw-r--r--ld/testsuite/ld-size/size64-2-x86-64.d16
12 files changed, 108 insertions, 85 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3bfea87..8d959db 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,19 @@
+2013-06-04 Roland McGrath <mcgrathr@google.com>
+
+ * ld-size/size.exp: For *-*-nacl* targets, use options_regsub(ld)
+ to massage -m arguments into _nacl variants.
+ * ld/testsuite/ld-size/size32-1-i386.d: Loosen regexps so they
+ don't care what the exact addresses are.
+ * ld/testsuite/ld-size/size32-1-x32.d: Likewise.
+ * ld/testsuite/ld-size/size32-1-x86-64.d: Likewise.
+ * ld/testsuite/ld-size/size32-2-i386.d: Likewise.
+ * ld/testsuite/ld-size/size32-2-x32.d: Likewise.
+ * ld/testsuite/ld-size/size32-2-x86-64.d: Likewise.
+ * ld/testsuite/ld-size/size64-1-x32.d: Likewise.
+ * ld/testsuite/ld-size/size64-1-x86-64.d: Likewise.
+ * ld/testsuite/ld-size/size64-2-x32.d: Likewise.
+ * ld/testsuite/ld-size/size64-2-x86-64.d: Likewise.
+
2013-06-04 H.J. Lu <hongjiu.lu@intel.com>
* ld-i386/tlsbindesc-nacl.rd: Updated for text/data/bss section
diff --git a/ld/testsuite/ld-size/size.exp b/ld/testsuite/ld-size/size.exp
index 9fe152c..9eedfd5 100644
--- a/ld/testsuite/ld-size/size.exp
+++ b/ld/testsuite/ld-size/size.exp
@@ -35,6 +35,13 @@ if {!(([istarget "i?86-*-*"]
return
}
+# So as to avoid rewriting every last test case here in a nacl variant,
+# we use black magic to massage the generic cases into nacl-variant cases.
+if [istarget "*-*-nacl*"] {
+ # Change all the -melf_i386 to -melf_i386_nacl so linking can succeed.
+ set options_regsub(ld) {-m(\\S+) -m\\1_nacl}
+}
+
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
foreach t $test_list {
# We need to strip the ".d", but can leave the dirname.
@@ -44,7 +51,7 @@ foreach t $test_list {
# We need a native system.
if ![isnative] {
- verbose "Natibe size relocation tests not run - not a native toolchain"
+ verbose "Native size relocation tests not run - not a native toolchain"
return
}
diff --git a/ld/testsuite/ld-size/size32-1-i386.d b/ld/testsuite/ld-size/size32-1-i386.d
index e8a6622..43091c1 100644
--- a/ld/testsuite/ld-size/size32-1-i386.d
+++ b/ld/testsuite/ld-size/size32-1-i386.d
@@ -8,15 +8,15 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+11f4 R_386_SIZE32 xxx
-0+11f8 R_386_SIZE32 xxx
-0+11fc R_386_SIZE32 xxx
-0+1200 R_386_SIZE32 yyy
-0+1204 R_386_SIZE32 zzz
+[[:xdigit:]]+ R_386_SIZE32 xxx
+[[:xdigit:]]+ R_386_SIZE32 xxx
+[[:xdigit:]]+ R_386_SIZE32 xxx
+[[:xdigit:]]+ R_386_SIZE32 yyy
+[[:xdigit:]]+ R_386_SIZE32 zzz
Contents of section .data:
- 11f4 00000000 e2ffffff 1e000000 00000000 ................
- 1204 00000000 00000000 00000000 00000000 ................
- 1214 00000000 00000000 00000000 00000000 ................
- 1224 00000000 00000000 00000000 ............
+ [[:xdigit:]]+ 00000000 e2ffffff 1e000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 ............
diff --git a/ld/testsuite/ld-size/size32-1-x32.d b/ld/testsuite/ld-size/size32-1-x32.d
index 1022dba..083f7b2 100644
--- a/ld/testsuite/ld-size/size32-1-x32.d
+++ b/ld/testsuite/ld-size/size32-1-x32.d
@@ -8,15 +8,15 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+200220 R_X86_64_SIZE32 xxx
-0+200224 R_X86_64_SIZE32 xxx-0x0000001e
-0+200228 R_X86_64_SIZE32 xxx\+0x0000001e
-0+20022c R_X86_64_SIZE32 yyy
-0+200230 R_X86_64_SIZE32 zzz
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx-0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx\+0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 yyy
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz
Contents of section .data:
- 200220 00000000 00000000 00000000 00000000 ................
- 200230 00000000 00000000 00000000 00000000 ................
- 200240 00000000 00000000 00000000 00000000 ................
- 200250 00000000 00000000 00000000 ............
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 ............
diff --git a/ld/testsuite/ld-size/size32-1-x86-64.d b/ld/testsuite/ld-size/size32-1-x86-64.d
index 80c4a66..a913dc2 100644
--- a/ld/testsuite/ld-size/size32-1-x86-64.d
+++ b/ld/testsuite/ld-size/size32-1-x86-64.d
@@ -8,15 +8,15 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+200360 R_X86_64_SIZE32 xxx
-0+200364 R_X86_64_SIZE32 xxx-0x000000000000001e
-0+200368 R_X86_64_SIZE32 xxx\+0x000000000000001e
-0+20036c R_X86_64_SIZE32 yyy
-0+200370 R_X86_64_SIZE32 zzz
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx-0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx\+0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 yyy
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz
Contents of section .data:
- 200360 00000000 00000000 00000000 00000000 ................
- 200370 00000000 00000000 00000000 00000000 ................
- 200380 00000000 00000000 00000000 00000000 ................
- 200390 00000000 00000000 00000000 ............
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 ............
diff --git a/ld/testsuite/ld-size/size32-2-i386.d b/ld/testsuite/ld-size/size32-2-i386.d
index 2db0e1d..636e87f 100644
--- a/ld/testsuite/ld-size/size32-2-i386.d
+++ b/ld/testsuite/ld-size/size32-2-i386.d
@@ -8,13 +8,13 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+123c R_386_SIZE32 xxx
-0+1240 R_386_SIZE32 yyy
-0+1244 R_386_SIZE32 zzz
-0+1248 R_386_SIZE32 zzz
-0+124c R_386_SIZE32 zzz
+[[:xdigit:]]+ R_386_SIZE32 xxx
+[[:xdigit:]]+ R_386_SIZE32 yyy
+[[:xdigit:]]+ R_386_SIZE32 zzz
+[[:xdigit:]]+ R_386_SIZE32 zzz
+[[:xdigit:]]+ R_386_SIZE32 zzz
Contents of section .data:
- 123c 00000000 00000000 00000000 e2ffffff ................
- 124c 1e000000 ....
+ [[:xdigit:]]+ 00000000 00000000 00000000 e2ffffff ................
+ [[:xdigit:]]+ 1e000000 ....
diff --git a/ld/testsuite/ld-size/size32-2-x32.d b/ld/testsuite/ld-size/size32-2-x32.d
index 9c1eae2..c619a00 100644
--- a/ld/testsuite/ld-size/size32-2-x32.d
+++ b/ld/testsuite/ld-size/size32-2-x32.d
@@ -8,13 +8,13 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+200278 R_X86_64_SIZE32 xxx
-0+20027c R_X86_64_SIZE32 yyy
-0+200280 R_X86_64_SIZE32 zzz
-0+200284 R_X86_64_SIZE32 zzz-0x0000001e
-0+200288 R_X86_64_SIZE32 zzz\+0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx
+[[:xdigit:]]+ R_X86_64_SIZE32 yyy
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz-0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz\+0x0000001e
Contents of section .data:
- 200278 00000000 00000000 00000000 00000000 ................
- 200288 00000000 ....
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 ....
diff --git a/ld/testsuite/ld-size/size32-2-x86-64.d b/ld/testsuite/ld-size/size32-2-x86-64.d
index 1851e0f..9091944 100644
--- a/ld/testsuite/ld-size/size32-2-x86-64.d
+++ b/ld/testsuite/ld-size/size32-2-x86-64.d
@@ -8,13 +8,13 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+2003d8 R_X86_64_SIZE32 xxx
-0+2003dc R_X86_64_SIZE32 yyy
-0+2003e0 R_X86_64_SIZE32 zzz
-0+2003e4 R_X86_64_SIZE32 zzz-0x000000000000001e
-0+2003e8 R_X86_64_SIZE32 zzz\+0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx
+[[:xdigit:]]+ R_X86_64_SIZE32 yyy
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz-0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz\+0x000000000000001e
Contents of section .data:
- 2003d8 00000000 00000000 00000000 00000000 ................
- 2003e8 00000000 ....
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 ....
diff --git a/ld/testsuite/ld-size/size64-1-x32.d b/ld/testsuite/ld-size/size64-1-x32.d
index 51c2f13..3681591 100644
--- a/ld/testsuite/ld-size/size64-1-x32.d
+++ b/ld/testsuite/ld-size/size64-1-x32.d
@@ -8,16 +8,16 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+200220 R_X86_64_SIZE32 xxx
-0+200228 R_X86_64_SIZE64 xxx-0x0000001e
-0+200230 R_X86_64_SIZE64 xxx\+0x0000001e
-0+200238 R_X86_64_SIZE32 yyy
-0+200240 R_X86_64_SIZE32 zzz
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx
+[[:xdigit:]]+ R_X86_64_SIZE64 xxx-0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE64 xxx\+0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 yyy
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz
Contents of section .data:
- 200220 00000000 00000000 00000000 00000000 ................
- 200230 00000000 00000000 00000000 00000000 ................
- 200240 00000000 00000000 00000000 00000000 ................
- 200250 00000000 00000000 00000000 00000000 ................
- 200260 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-size/size64-1-x86-64.d b/ld/testsuite/ld-size/size64-1-x86-64.d
index c4ed9c2..36c2912 100644
--- a/ld/testsuite/ld-size/size64-1-x86-64.d
+++ b/ld/testsuite/ld-size/size64-1-x86-64.d
@@ -8,16 +8,16 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+200360 R_X86_64_SIZE64 xxx
-0+200368 R_X86_64_SIZE64 xxx-0x000000000000001e
-0+200370 R_X86_64_SIZE64 xxx\+0x000000000000001e
-0+200378 R_X86_64_SIZE64 yyy
-0+200380 R_X86_64_SIZE64 zzz
+[[:xdigit:]]+ R_X86_64_SIZE64 xxx
+[[:xdigit:]]+ R_X86_64_SIZE64 xxx-0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE64 xxx\+0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE64 yyy
+[[:xdigit:]]+ R_X86_64_SIZE64 zzz
Contents of section .data:
- 200360 00000000 00000000 00000000 00000000 ................
- 200370 00000000 00000000 00000000 00000000 ................
- 200380 00000000 00000000 00000000 00000000 ................
- 200390 00000000 00000000 00000000 00000000 ................
- 2003a0 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-size/size64-2-x32.d b/ld/testsuite/ld-size/size64-2-x32.d
index 1a30c98..f9f31b5 100644
--- a/ld/testsuite/ld-size/size64-2-x32.d
+++ b/ld/testsuite/ld-size/size64-2-x32.d
@@ -8,14 +8,14 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+200278 R_X86_64_SIZE32 xxx
-0+200280 R_X86_64_SIZE32 yyy
-0+200288 R_X86_64_SIZE32 zzz
-0+200290 R_X86_64_SIZE64 zzz-0x0000001e
-0+200298 R_X86_64_SIZE64 zzz\+0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE32 xxx
+[[:xdigit:]]+ R_X86_64_SIZE32 yyy
+[[:xdigit:]]+ R_X86_64_SIZE32 zzz
+[[:xdigit:]]+ R_X86_64_SIZE64 zzz-0x0000001e
+[[:xdigit:]]+ R_X86_64_SIZE64 zzz\+0x0000001e
Contents of section .data:
- 200278 00000000 00000000 00000000 00000000 ................
- 200288 00000000 00000000 00000000 00000000 ................
- 200298 00000000 00000000 ........
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 ........
diff --git a/ld/testsuite/ld-size/size64-2-x86-64.d b/ld/testsuite/ld-size/size64-2-x86-64.d
index 4cc11cf..099c8ab 100644
--- a/ld/testsuite/ld-size/size64-2-x86-64.d
+++ b/ld/testsuite/ld-size/size64-2-x86-64.d
@@ -8,14 +8,14 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
-0+2003d8 R_X86_64_SIZE64 xxx
-0+2003e0 R_X86_64_SIZE64 yyy
-0+2003e8 R_X86_64_SIZE64 zzz
-0+2003f0 R_X86_64_SIZE64 zzz-0x000000000000001e
-0+2003f8 R_X86_64_SIZE64 zzz\+0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE64 xxx
+[[:xdigit:]]+ R_X86_64_SIZE64 yyy
+[[:xdigit:]]+ R_X86_64_SIZE64 zzz
+[[:xdigit:]]+ R_X86_64_SIZE64 zzz-0x000000000000001e
+[[:xdigit:]]+ R_X86_64_SIZE64 zzz\+0x000000000000001e
Contents of section .data:
- 2003d8 00000000 00000000 00000000 00000000 ................
- 2003e8 00000000 00000000 00000000 00000000 ................
- 2003f8 00000000 00000000 ........
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 00000000 00000000 ................
+ [[:xdigit:]]+ 00000000 00000000 ........