ld: Restore linker scripts in PR ld/21884 tests
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 13 Aug 2017 12:41:37 +0000 (05:41 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 13 Aug 2017 12:41:37 +0000 (05:41 -0700)
OUTPUT_FORMAT in linker script of PR ld/21884 tests is needed to trigger
PR ld/21884.  Restore linker scripts and add nacl versions of the same
tests.

* testsuite/ld-i386/i386.exp: Run pr21884-nacl.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr21884.d: Don't run on nacl targets.
* testsuite/ld-x86-64/pr21884.d: Likewise.
* testsuite/ld-i386/pr21884.t: Revert the last change.
* testsuite/ld-x86-64/pr21884.t: Likewise.
* testsuite/ld-i386/pr21884-nacl.d: New file.
* testsuite/ld-i386/pr21884-nacl.t: Likewise.
* testsuite/ld-x86-64/pr21884-nacl.d: Likewise.
* testsuite/ld-x86-64/pr21884-nacl.t: Likewise.

ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr21884-nacl.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr21884-nacl.t [new file with mode: 0644]
ld/testsuite/ld-i386/pr21884.d
ld/testsuite/ld-i386/pr21884.t
ld/testsuite/ld-x86-64/pr21884-nacl.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr21884-nacl.t [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr21884.d
ld/testsuite/ld-x86-64/pr21884.t
ld/testsuite/ld-x86-64/x86-64.exp

index fdd8d58c170ec2d5839fecb6d90c3e1f5f0c73c1..aad32493af1909b5a0a20542a9eadc9025f48877 100644 (file)
@@ -1,3 +1,16 @@
+2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-i386/i386.exp: Run pr21884-nacl.
+       * testsuite/ld-x86-64/x86-64.exp: Likewise.
+       * testsuite/ld-i386/pr21884.d: Don't run on nacl targets.
+       * testsuite/ld-x86-64/pr21884.d: Likewise.
+       * testsuite/ld-i386/pr21884.t: Revert the last change.
+       * testsuite/ld-x86-64/pr21884.t: Likewise.
+       * testsuite/ld-i386/pr21884-nacl.d: New file.
+       * testsuite/ld-i386/pr21884-nacl.t: Likewise.
+       * testsuite/ld-x86-64/pr21884-nacl.d: Likewise.
+       * testsuite/ld-x86-64/pr21884-nacl.t: Likewise.
+
 2017-08-13  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-i386/pr21884.t: Remove unneeded format, arch and entry.
index 34f03e04702a516e5363c294824f3034cfe62e3f..27d622eab424cb142e759844642332c8e80060f1 100644 (file)
@@ -438,6 +438,7 @@ run_dump_test "property-x86-shstk5"
 run_dump_test "pie1"
 run_dump_test "pie1-nacl"
 run_dump_test "pr21884"
+run_dump_test "pr21884-nacl"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr21884-nacl.d b/ld/testsuite/ld-i386/pr21884-nacl.d
new file mode 100644 (file)
index 0000000..82daaaa
--- /dev/null
@@ -0,0 +1,10 @@
+#source: dummy.s
+#as: --32
+#ld: -m elf_i386 -T pr21884-nacl.t -b binary
+#objdump: -b binary -s
+#target: i?86-*-nacl* x86_64-*-nacl*
+
+.*:     file format binary
+
+Contents of section .data:
+#pass
diff --git a/ld/testsuite/ld-i386/pr21884-nacl.t b/ld/testsuite/ld-i386/pr21884-nacl.t
new file mode 100644 (file)
index 0000000..3ffb56c
--- /dev/null
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT("elf32-i386-nacl");
+OUTPUT_ARCH(i386);
+
+ENTRY(_start);
+SECTIONS {
+        . = 0x10000;
+        _start = . ;
+        .data : {
+                *(.data)
+        }
+}
index dc212d3c68aa8809b0e84835b3c0d9f842242722..ea73aa2a759e007996acd9587a1d83e58db5a781 100644 (file)
@@ -2,6 +2,7 @@
 #as: --32
 #ld: -m elf_i386 -T pr21884.t -b binary
 #objdump: -b binary -s
+#notarget: i?86-*-nacl* x86_64-*-nacl*
 
 .*:     file format binary
 
index fcb7bce20ecb2bd65d5626aba6167b5fb5757470..4cf8cdcaa3097d8cb1dba1261fcd1ad279c4761c 100644 (file)
@@ -1,3 +1,7 @@
+OUTPUT_FORMAT("elf32-i386");
+OUTPUT_ARCH(i386);
+
+ENTRY(_start);
 SECTIONS {
         . = 0x10000;
         _start = . ;
diff --git a/ld/testsuite/ld-x86-64/pr21884-nacl.d b/ld/testsuite/ld-x86-64/pr21884-nacl.d
new file mode 100644 (file)
index 0000000..8883505
--- /dev/null
@@ -0,0 +1,10 @@
+#source: dummy.s
+#as: --64
+#ld: -m elf_x86_64 -T pr21884-nacl.t -b binary
+#objdump: -b binary -s
+#target: x86_64-*-nacl*
+
+.*:     file format binary
+
+Contents of section .data:
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr21884-nacl.t b/ld/testsuite/ld-x86-64/pr21884-nacl.t
new file mode 100644 (file)
index 0000000..722312e
--- /dev/null
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT("elf64-x86-64-nacl");
+OUTPUT_ARCH(i386:x86-64);
+
+ENTRY(_start);
+SECTIONS {
+        . = 0x10000;
+        _start = . ;
+        .data : {
+                *(.data)
+        }
+}
index a62d8bc4f7a9d12e911b26c8e42e7fdb3f1fa9a0..7a2a3f361c63008d890245ba04208db082155515 100644 (file)
@@ -2,6 +2,7 @@
 #as: --64
 #ld: -m elf_x86_64 -T pr21884.t -b binary
 #objdump: -b binary -s
+#notarget: x86_64-*-nacl*
 
 .*:     file format binary
 
index fcb7bce20ecb2bd65d5626aba6167b5fb5757470..edd20704c7f650d5b6718e444d40066218680805 100644 (file)
@@ -1,3 +1,7 @@
+OUTPUT_FORMAT("elf64-x86-64");
+OUTPUT_ARCH(i386:x86-64);
+
+ENTRY(_start);
 SECTIONS {
         . = 0x10000;
         _start = . ;
index 0009fe321bb1c06323111433c16e9a1c123eb6cd..46311577e4b2444e9d5551b61d625dcf6d538469 100644 (file)
@@ -366,6 +366,7 @@ run_dump_test "property-x86-shstk4-x32"
 run_dump_test "property-x86-shstk5"
 run_dump_test "property-x86-shstk5-x32"
 run_dump_test "pr21884"
+run_dump_test "pr21884-nacl"
 
 if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
     return
This page took 0.030547 seconds and 4 git commands to generate.