Add a test for PR binutils/21978
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 30 Sep 2017 10:04:52 +0000 (03:04 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 30 Sep 2017 10:04:52 +0000 (03:04 -0700)
PR binutils/21978
* testsuite/ld-elf/pr21978.od: New file.
* testsuite/ld-elf/pr21978a.c: Likewise.
* testsuite/ld-elf/pr21978b.c: Likewise.
* testsuite/ld-elf/shared.exp: Run PR binutils/21978 test.

ld/ChangeLog
ld/testsuite/ld-elf/pr21978.od [new file with mode: 0644]
ld/testsuite/ld-elf/pr21978a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr21978b.c [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp

index 1c5ca556ff8885a089402a81c6fdd9a8bfbd4e22..0c117771175ad6087d088a93e1988276ff2e4fc8 100644 (file)
@@ -1,3 +1,11 @@
+2017-09-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/21978
+       * testsuite/ld-elf/pr21978.od: New file.
+       * testsuite/ld-elf/pr21978a.c: Likewise.
+       * testsuite/ld-elf/pr21978b.c: Likewise.
+       * testsuite/ld-elf/shared.exp: Run PR binutils/21978 test.
+
 2017-09-28  Nick Clifton  <nickc@redhat.com>
 
        PR 14918
diff --git a/ld/testsuite/ld-elf/pr21978.od b/ld/testsuite/ld-elf/pr21978.od
new file mode 100644 (file)
index 0000000..6bc3345
--- /dev/null
@@ -0,0 +1,7 @@
+#...
+.*/ld/testsuite/ld-elf/pr21978a.c:1
+void foo \(void\) {}
+#...
+.*/ld/testsuite/ld-elf/pr21978b.c:1
+void bar \(void\) {}
+#pass
diff --git a/ld/testsuite/ld-elf/pr21978a.c b/ld/testsuite/ld-elf/pr21978a.c
new file mode 100644 (file)
index 0000000..aa6d4c2
--- /dev/null
@@ -0,0 +1 @@
+void foo (void) {}
diff --git a/ld/testsuite/ld-elf/pr21978b.c b/ld/testsuite/ld-elf/pr21978b.c
new file mode 100644 (file)
index 0000000..01bda76
--- /dev/null
@@ -0,0 +1 @@
+void bar (void) {}
index 2bb0750ec1a1660f2be48f90e51dd257444eed42..6e091c9aa69153382dc5939755e9f46172eb078e 100644 (file)
@@ -458,6 +458,9 @@ set build_tests {
   {"Build pr21964-2b.so"
    "-shared" "-fPIC"
    {pr21964-2b.c} {} "pr21964-2b.so"}
+  {"Dump pr21978.so"
+   "-shared" "-fPIC -g -O2"
+   {pr21978a.c pr21978b.c} {{objdump {-Sl} pr21978.od}} "pr21978.so"}
 }
 
 run_cc_link_tests $build_tests