aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/testsuite/ld-plugin/lto.exp5
-rw-r--r--ld/testsuite/ld-plugin/pr25355.c2
-rw-r--r--ld/testsuite/ld-plugin/pr25355.d4
-rw-r--r--ld/testsuite/lib/ld-lib.exp1
5 files changed, 21 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c3b5541..57c215f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/25355
+ * testsuite/ld-plugin/lto.exp: Run PR binutils/25355 test.
+ * testsuite/ld-plugin/pr25355.c: New file.
+ * testsuite/ld-plugin/pr25355.d: Likewise.
+ * testsuite/lib/ld-lib.exp (run_cc_link_tests): Support compile
+ only dump.
+
2020-02-07 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/ld-unique/unique.exp (contains_unique_symbol): Updated.
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 9b03b7b3..1b44b0d 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -234,6 +234,11 @@ set lto_link_tests [list \
[list "Build pr24406-2b.o" \
"" "-O2 -fno-lto" \
{pr24406-2b.c}] \
+ [list "pr25355.o" \
+ "" \
+ "-flto -fno-common $lto_no_fat" \
+ {pr25355.c} \
+ [list [list "nm" "$plug_opt" "pr25355.d"]]] \
]
if { [at_least_gcc_version 4 7] } {
diff --git a/ld/testsuite/ld-plugin/pr25355.c b/ld/testsuite/ld-plugin/pr25355.c
new file mode 100644
index 0000000..99f01fb
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr25355.c
@@ -0,0 +1,2 @@
+int nm_test_var;
+int nm_test_var2 = 1234;
diff --git a/ld/testsuite/ld-plugin/pr25355.d b/ld/testsuite/ld-plugin/pr25355.d
new file mode 100644
index 0000000..98d10ab
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr25355.d
@@ -0,0 +1,4 @@
+#...
+[0-9a-f]+ B _?nm_test_var
+[0-9a-f]+ D _?nm_test_var2
+#pass
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 08e2d69..015eda6 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -928,6 +928,7 @@ proc run_cc_link_tests { ldtests } {
if { $binfile eq "tmpdir/" } {
# compile only
+ set binfile $objfile
} elseif { [regexp ".*\\.a$" $binfile] } {
if { ![ar_simple_create $ar $ldflags $binfile "$objfiles"] } {
set failed 1