ld: Add a PR binutils/26389 test
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 16 Aug 2020 12:45:02 +0000 (05:45 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 16 Aug 2020 12:45:02 +0000 (05:45 -0700)
PR binutils/26389
* testsuite/ld-plugin/lto.exp: Run PR binutils/26389 test.
* testsuite/ld-plugin/pr26389.c: New file.
* testsuite/ld-plugin/pr26389.d: Likewise.

ld/ChangeLog
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr26389.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr26389.d [new file with mode: 0644]

index bfbc6c32cbc641729f5aeaa3ffdfd6844d24c2d4..3131c687d09772be7ab31dda6c5271af989c365c 100644 (file)
@@ -1,3 +1,10 @@
+2020-08-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26389
+       * testsuite/ld-plugin/lto.exp: Run PR binutils/26389 test.
+       * testsuite/ld-plugin/pr26389.c: New file.
+       * testsuite/ld-plugin/pr26389.d: Likewise.
+
 2020-08-14  Tamar Christina  <tamar.christina@arm.com>
 
        * testsuite/ld-arm/thumb-plt-got.d: Relax regexpr.
index cb2973f3a39210e133c3f08291c9c7d3a68820f8..6a37025db59d3abd0397242f6e10d780482a4327 100644 (file)
@@ -241,6 +241,10 @@ set lto_link_tests [list \
    {dummy.c} \
    {{error_output "pr26267.err"}} \
    "pr26267b"] \
+  [list "Build pr26389.o" \
+   "$plug_opt" "-flto $lto_no_fat -fcommon" \
+   {pr26389.c} \
+   [list [list "nm" "$plug_opt" "pr26389.d"]]] \
 ]
 
 if { [at_least_gcc_version 10 0] } {
diff --git a/ld/testsuite/ld-plugin/pr26389.c b/ld/testsuite/ld-plugin/pr26389.c
new file mode 100644 (file)
index 0000000..84806ff
--- /dev/null
@@ -0,0 +1 @@
+char nm_test_var;
diff --git a/ld/testsuite/ld-plugin/pr26389.d b/ld/testsuite/ld-plugin/pr26389.d
new file mode 100644 (file)
index 0000000..e4ad69a
--- /dev/null
@@ -0,0 +1,3 @@
+#...
+0+ C _?nm_test_var
+#pass
This page took 0.027762 seconds and 4 git commands to generate.