aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-plugin')
-rw-r--r--ld/testsuite/ld-plugin/plugin.exp8
-rw-r--r--ld/testsuite/ld-plugin/pr17973.d4
-rw-r--r--ld/testsuite/ld-plugin/pr17973.s3
3 files changed, 14 insertions, 1 deletions
diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp
index 35b7bbe..b6007eb 100644
--- a/ld/testsuite/ld-plugin/plugin.exp
+++ b/ld/testsuite/ld-plugin/plugin.exp
@@ -66,6 +66,7 @@ verbose "Full plugin3 path $plugin3_path" 2
set regclm "-plugin-opt registerclaimfile"
set regas "-plugin-opt registerallsymbolsread"
+set regassilent "-plugin-opt registerallsymbolsreadsilent"
set regcln "-plugin-opt registercleanup"
if { [istarget m681*-*-*] || [istarget m68hc1*-*-*] || [istarget m9s12x*-*-*] } {
@@ -85,7 +86,9 @@ set plugin_nm_output ""
if { $can_compile && \
(![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main.c tmpdir/main.o] \
|| ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/func.c tmpdir/func.o] \
- || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/text.c tmpdir/text.o]) } {
+ || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/text.c tmpdir/text.o] \
+ || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/dummy.s tmpdir/dummy.o] \
+ || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/pr17973.s tmpdir/pr17973.o]) } {
# Defer fail until we have list of tests set.
set failed_compile 1
}
@@ -174,6 +177,9 @@ set plugin_tests [list \
$testobjfiles $libs" "" "" "" {{ld plugin-28.d}} "main.x" ] \
[list "plugin warning" "-plugin $plugin2_path -plugin-opt warning \
$testobjfiles $libs" "" "" "" {{ld plugin-29.d}} "main.x" ] \
+ [list "PR ld/17973" "-plugin $plugin2_path -shared $regassilent \
+ -plugin-opt add:tmpdir/pr17973.o \
+ tmpdir/dummy.o" "" "" "" {{readelf -sW pr17973.d}} "main.x" ] \
]
set plugin_lib_tests [list \
diff --git a/ld/testsuite/ld-plugin/pr17973.d b/ld/testsuite/ld-plugin/pr17973.d
new file mode 100644
index 0000000..85c849a
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr17973.d
@@ -0,0 +1,4 @@
+#failif
+#...
+.*0+ +FILE +LOCAL +DEFAULT +ABS tmpdir/pr17973.o
+#...
diff --git a/ld/testsuite/ld-plugin/pr17973.s b/ld/testsuite/ld-plugin/pr17973.s
new file mode 100644
index 0000000..77c5c8a
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr17973.s
@@ -0,0 +1,3 @@
+ .data
+foo:
+ .dc.a bar