aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-gc/gc.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-06-28 08:08:04 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-06-28 08:08:30 -0700
commitf4ab0e2d1d4e14cfdddf46ac846c48ae55f4e14a (patch)
treed2afef7558477e2ddbc901c3170a3a0278b61b75 /ld/testsuite/ld-gc/gc.exp
parent1b857aeed3f5cfddc4b5b1f5836ccd341aeb9f5d (diff)
downloadgdb-f4ab0e2d1d4e14cfdddf46ac846c48ae55f4e14a.zip
gdb-f4ab0e2d1d4e14cfdddf46ac846c48ae55f4e14a.tar.gz
gdb-f4ab0e2d1d4e14cfdddf46ac846c48ae55f4e14a.tar.bz2
Skip version check for unreferenced and undefined symbol
No need to check version if symbol is unreferenced and undefined. bfd/ PR ld/20306 * elflink.c (elf_link_check_versioned_symbol): Return false for unreferenced undefined symbol. ld/testsuite/ * testsuite/ld-gc/gc.exp: Run pr20306 test. * ld-gc/pr20306.c: New file. * ld-gc/pr20306.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-gc/gc.exp')
-rw-r--r--ld/testsuite/ld-gc/gc.exp15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index ffc619c..a6f3e13 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -146,3 +146,18 @@ if { [is_remote host] || [which $CC] != 0 } {
ld_compile "$CC $CFLAGS $cflags -O0" $srcdir/$subdir/pr19161-2.c tmpdir/pr19161-2.o
run_dump_test "pr19161"
}
+
+if { [is_elf_format] && [check_shared_lib_support] \
+ && ([is_remote host] || [which $CC] != 0) } {
+ run_cc_link_tests [list \
+ [list \
+ "Build libpr20306.so" \
+ "-shared" \
+ "-fPIC" \
+ {pr20306.c} \
+ {} \
+ "libpr20306.so" \
+ ] \
+ ]
+ run_dump_test "pr20306"
+}