aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-08-16 05:45:02 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-08-16 05:45:02 -0700
commit246b9ea1983d59c8b0070746a904a6b3f8d62187 (patch)
tree4ad846f3f29ada6d4e3d3326117ec0e823f63df0 /ld/testsuite/ld-plugin
parentf569c1c51a1ff643fc7ba961555fe1067dcf5304 (diff)
downloadgdb-246b9ea1983d59c8b0070746a904a6b3f8d62187.zip
gdb-246b9ea1983d59c8b0070746a904a6b3f8d62187.tar.gz
gdb-246b9ea1983d59c8b0070746a904a6b3f8d62187.tar.bz2
ld: Add a PR binutils/26389 test
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.
Diffstat (limited to 'ld/testsuite/ld-plugin')
-rw-r--r--ld/testsuite/ld-plugin/lto.exp4
-rw-r--r--ld/testsuite/ld-plugin/pr26389.c1
-rw-r--r--ld/testsuite/ld-plugin/pr26389.d3
3 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index cb2973f..6a37025 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -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
index 0000000..84806ff
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr26389.c
@@ -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
index 0000000..e4ad69a
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr26389.d
@@ -0,0 +1,3 @@
+#...
+0+ C _?nm_test_var
+#pass