Add 2 more tests for PR ld/21884
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 11 Aug 2017 15:05:00 +0000 (08:05 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 11 Aug 2017 15:05:00 +0000 (08:05 -0700)
PR ld/21884
* testsuite/ld-i386/i386.exp: Run pr21884.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr21884.d: New file.
* testsuite/ld-i386/pr21884.t: Likewise.
* testsuite/ld-x86-64/pr21884.d: Likewise.
* testsuite/ld-x86-64/pr21884.t: Likewise.

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

index 12c3a746015b1a4f8266ca081cfd79c32d13663c..484c36cb0416e84177edac37f6c33b79b234a30a 100644 (file)
@@ -1,3 +1,13 @@
+2017-08-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/21884
+       * testsuite/ld-i386/i386.exp: Run pr21884.
+       * testsuite/ld-x86-64/x86-64.exp: Likewise.
+       * testsuite/ld-i386/pr21884.d: New file.
+       * testsuite/ld-i386/pr21884.t: Likewise.
+       * testsuite/ld-x86-64/pr21884.d: Likewise.
+       * testsuite/ld-x86-64/pr21884.t: Likewise.
+
 2017-08-10  Nick Clifton  <nickc@redhat.com>
 
        * scripttempl/pep.sc: Enclose __CTOR_LIST__, ___CTOR_LIST__,
index 060a7e9dd4712fc27ee91b28941832bfd96d089d..34f03e04702a516e5363c294824f3034cfe62e3f 100644 (file)
@@ -437,6 +437,7 @@ run_dump_test "property-x86-shstk4"
 run_dump_test "property-x86-shstk5"
 run_dump_test "pie1"
 run_dump_test "pie1-nacl"
+run_dump_test "pr21884"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr21884.d b/ld/testsuite/ld-i386/pr21884.d
new file mode 100644 (file)
index 0000000..dc212d3
--- /dev/null
@@ -0,0 +1,9 @@
+#source: dummy.s
+#as: --32
+#ld: -m elf_i386 -T pr21884.t -b binary
+#objdump: -b binary -s
+
+.*:     file format binary
+
+Contents of section .data:
+#pass
diff --git a/ld/testsuite/ld-i386/pr21884.t b/ld/testsuite/ld-i386/pr21884.t
new file mode 100644 (file)
index 0000000..9ec7dc8
--- /dev/null
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT("elf32-i386");
+OUTPUT_ARCH(i386);
+
+ENTRY(_start); 
+SECTIONS {
+        . = 0x10000;
+        _start = . ;
+        .data : {
+                *(.data)
+        }
+}
diff --git a/ld/testsuite/ld-x86-64/pr21884.d b/ld/testsuite/ld-x86-64/pr21884.d
new file mode 100644 (file)
index 0000000..a62d8bc
--- /dev/null
@@ -0,0 +1,9 @@
+#source: dummy.s
+#as: --64
+#ld: -m elf_x86_64 -T pr21884.t -b binary
+#objdump: -b binary -s
+
+.*:     file format binary
+
+Contents of section .data:
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr21884.t b/ld/testsuite/ld-x86-64/pr21884.t
new file mode 100644 (file)
index 0000000..f57cb3a
--- /dev/null
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT("elf64-x86-64");
+OUTPUT_ARCH(i386:x86-64);
+
+ENTRY(_start); 
+SECTIONS {
+        . = 0x10000;
+        _start = . ;
+        .data : {
+                *(.data)
+        }
+}
index 0375da6aa64b932c51628709774cce6cb4a706b7..0009fe321bb1c06323111433c16e9a1c123eb6cd 100644 (file)
@@ -365,6 +365,7 @@ run_dump_test "property-x86-shstk4"
 run_dump_test "property-x86-shstk4-x32"
 run_dump_test "property-x86-shstk5"
 run_dump_test "property-x86-shstk5-x32"
+run_dump_test "pr21884"
 
 if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
     return